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


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.

Reply via email to