You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Wes Wannemacher (JIRA)" <ji...@apache.org> on 2008/02/12 07:23:39 UTC

[jira] Commented: (WW-2455) form enctype="multipart/form-data" with elements text / file causes SQL Exception / works fine in firefox

    [ https://issues.apache.org/struts/browse/WW-2455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43185#action_43185 ] 

Wes Wannemacher commented on WW-2455:
-------------------------------------

Lars, out of curiousity, what do you have IE setup to display? If you click, View -> Encoding (IIRC?) is it set to auto-select? If so, does it work if you change it to utf-8? Does it make a difference if you have the page contentType charset match case with the others (You're using UTF-8 for the page contentType charset and utf-8 for s:form and META)?

> form enctype="multipart/form-data" with elements text / file causes SQL Exception / works fine in firefox
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: WW-2455
>                 URL: https://issues.apache.org/struts/browse/WW-2455
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.0.11
>         Environment: Suse 9.11, x64, 4 GB Ram
>            Reporter: Lars Paetzold
>             Fix For: 2.1.1
>
>
> We got the following form-element:
> <s:form action="HR_Personal_add" method="post" cssClass="Personal_bearbeiten" enctype="multipart/form-data" acceptcharset="utf-8">
> ...
> <s:textfield label="Vorname" name="p_vorname" required="true" />
> <s:textfield label="Nachname" name="p_nachname" required="true" />
> <s:file label="Foto" name="p_bild" />
> ..
> </s:form>
> and the header-elements:
> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <html>
> <head>
> ...
> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
> ...
> </head>
> Trying the values:
> p_vorname = Özgün
> p_nachname = Ipslü
> p_bild = somefile.jpg
> if the form has been submitted, everything works fine in Firefox 2.x and the employyee will be put into the database through hibernate support.
> when now submitting the same form with the same values with internet explorer 6.028 an exception occurs:
> java.sql.SQLException: Incorrect string value: '\xEF\xBF\xBDzi' for column 'vorname' at row 1
> i think this might be a problem with processing the utf-8 values / internet explorer compatibility. hibernate is set up properly and works fine with utf-8 support.
> the problem only occurs in the combination of utf-8 text values and the multipart/form-data statement. if multipart/form-data is left out everythink works fine, so i assume it's not hibernate.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.