You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2004/07/03 01:36:51 UTC

DO NOT REPLY [Bug 29896] New: - html:text and some japanese character

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29896>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29896

html:text and some japanese character

           Summary: html:text and some japanese character
           Product: Struts
           Version: 1.1 Final
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Custom Tags
        AssignedTo: dev@struts.apache.org
        ReportedBy: dohtemp2@tele2.fr


- I got some article japanese description having been saved in a database.

- I want to a edit/admin the info in a form.

- I populate the DynaActionForm I use on that form in the concerned 
DispatchAction.

- In the JSP I Have:
<%
  response.setContentType("text/html; charset="+strCharset); 
  request.setCharacterEncoding("ISO-2022-JP"); 
%>


- I use a html:text custom tag to get that info in the JSP:
<html:text maxlength="250" size="60" property="descr_ja" />

- In the HTML page that gives: 
<input type="text" name="descr_ja" maxlength="250" size="60" value="$B%F%#!<%;%
C%H(B">

- This CRASHES the input on IE and cut the info after a certain amount of chars 
on Mozilla 0.9

- Whereas, if I use a jsp:usebean tag to reference the bean and call the value 
this way :
<input type="text" name="descr_ja" maxlength="250" size="60" value="<%
=adminArticleForm.get("descr_ja")%>">

- This gives me in HTML :
<input type="text" name="descr_ja" maxlength="250" size="60" value="$B%F%#!
&lt;%;%C%H(B">

- In that case, The "<" char has been encoded and the info shows well.

- It works well for japanese info not having the char which partly shows as "<" 
in the HTML code. This japanese char is the symbol looking like an underscore 
on a japanese keyboard. There might be some more provoking trouble.

Regards,
Doh.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org