You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lars Paetzold (JIRA)" <ji...@apache.org> on 2008/01/24 11:13:04 UTC
[jira] Issue Comment Edited: (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=43085#action_43085 ]
lpaetzold edited comment on WW-2455 at 1/24/08 2:11 AM:
------------------------------------------------------------
i got on the idea to use
System.out.println(request.getCharacterEncoding());
System.out.println(getP_vorname());
here are the results
Firefox:
UTF-8
Gülchan
IE:
UTF-8
G?lchan
seems that IE reconizes the utf-8 encryption but uses ISO one for the formular textfield. firefox does not have this problem.
any suggestion?
was (Author: lpaetzold):
i got on the idea to use
System.out.println(request.getCharacterEncoding());
System.out.println(getP_vorname());
here are the results
Firefox:
UTF-8
Gülchan
IE:
UTF-8
G?lchan
seems that IE reconizes the utf-8 encryption but uses ISO one for the formular textfield. firefox does not have this problem.
any suggestion?
> 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.