perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thom Hehl <t...@nowhereatall.com>
Subject CGI character translation??? Resolved
Date Thu, 04 Aug 2005 23:30:52 GMT
OK, just to help out others with the pain I have suffered over this issue.

Both Apache and Java take pains to support internationalization. This is 
the root of the problem.

When writing the output file from java, it was picking up the character 
set from the Apache environment. In both of the Apache servers I found, 
it was an ANSI character set even though everything else in the 
operating system was running UTF-8.

This was the reason that when I ran my program from the command prompt 
it worked fine because the command prompt was running under UTF-8. When 
running under Apache, though, it was translating my special unicode 
characters incorrectly because I needed to use the UTF-8 character set 
to get my character.

After a week of research, I finally figured out to use the 
OutputStreamWriter class and give it "UTF-8" as the character set to use 
for that file and everything is now working fine.

Hope this helps someone else. Sorry for slightly off-topic, but was good 
information anyway.

Mime
View raw message