Hi @all,
we are building a web application (Struts) that currently cannot handle
the input of certain chars especially the euro symbol (). The
decimal value of the character varies depending on the Character
Encoding set in the browser. I cannot use
request.getCharacterEncoding() since an encoding specification is not
mandatory for a request.
This issue will surely arise for all characters not part of the Latin1
char set.
Does anyone know how to handle this encoding issue to map it back to
unicode + UTF-8? Any other solution known?
TIA
Frank
frank_ratzlow@nojunk.hotmail.com
hiwa - 27 Oct 2005 10:26 GMT
Calling request.setCharacterEncoding() method is the typical
solution. For a JSP document, write a full page directive for
encoding and charset specification.
See this page:
http://www.javaworld.com/javaworld/jw-04-2004/jw-0419-multibytes.html
This article mentions multi-byte issue, but generally useful for
learning Web application encoding issue in general.
frank_ratzlow@hotmail.com - 06 Nov 2005 10:58 GMT
Hi Hiwa,
sorry for the delay. Thanks a lot for the link. It (and the resources
from the appendix) helped me tremendously.
Greetings
Frank
> Calling request.setCharacterEncoding() method is the typical
> solution. For a JSP document, write a full page directive for
[quoted text clipped - 4 lines]
> This article mentions multi-byte issue, but generally useful for
> learning Web application encoding issue in general.
Roedy Green - 27 Oct 2005 11:18 GMT
>Does anyone know how to handle this encoding issue to map it back to
>unicode + UTF-8? Any other solution known?
I have not dealt with this. What controls the encoding choice? Is it
something set by the OS? the encoding of the enclosing web page? some
parameter on the FORM?
With an Applet you can choose the encoding. Perhaps something similar
can be done with JavaScript.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Roedy Green - 27 Oct 2005 11:24 GMT
>I cannot use
>request.getCharacterEncoding() since an encoding specification is not
>mandatory for a request.
What a goofy way to run a universe. Does the lack of such a
specification imply a default encoding?

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.