• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Character Encoding

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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., http://www.google.com/intl/tr/) 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?
 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
Example



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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic