Skip to content

Charset Encoding

May 1, 2009
tags:

set correct database encoding

2) correctly decode characters sent by the browser
most browsers do not send info what encoding was used
when sending that encoded data to the server.
If that information is not provided – server uses default
encoding, which is ISO-8859-1.

To give the server some hint what encoding to use – try to use filters. Look at :
SetCharacterEncodingFilter that comes with Tomcat examples (examples/web-inf/classes/filters)

It only checks if characterEncoding was set, and if not – it sets
the default encoding specified in the configuration.

LANG
java -Dfile.encoding=Cp850 MyApp

http://java.sun.com/javase/6/docs/api/java/nio/charset/Charset.html

OR Set the jdbc prop charSet as GDB and resolve it.
http://kore-nordmann.de/blog/0082_charset_versus_encoding.html

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: