File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Character Encoding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Character Encoding" Watch "Character Encoding" New topic

Character Encoding

Michael J. Makunas
Ranch Hand

Joined: Mar 11, 2002
Posts: 37
Not sure if this is the correct forum for this but....

I have an Apache/Tomcat/MySql site that has mix of English and Turkish content. When someone views the site, some of the Turkish characters are not displaying properly. I tried adding the following to all pages:

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

But for some reason browsers are auto-detecting the site as "Western" or "ISO-8859-1" even though when I go to other sites that suport the Turkish character set and that also use the same meta tag (e.g., they are auto-detected as "Unicode" or "UTF-8". Is there a way to set the character encoding at the http server or app server level?
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
Is there a way to set the character encoding at the http server or app server level?

In my opinion,

I have 2 solution to solve this problem.

1. Set charset inpage directive of JSP page.

2. Use Sevlet Filter for Encoding in each request.

Reference Website
Unicode development with DbForms, MySQL 4.1, and friends

Multibyte-character processing in J2EE

End-to-end internationalization of Web applications

Java Developer, Thailand
I agree. Here's the link:
subject: Character Encoding
It's not a secret anymore!