Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

How to handle different character sets with web applications?

Thread view: 
frank_ratzlow@hotmail.com - 27 Oct 2005 10:16 GMT
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.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.