tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject İlgi:RE: Character Encoding Problem
Date Mon, 02 Jul 2001 09:16:03 GMT
> Kimden: Tõnu Põld <>
> Tarih: 2001/07/02 Mon AM 10:48:10 GMT+03:00
> Kime: "''" <>
> Konu: RE: Character Encoding Problem
> Hi,
> You should compile the java classes with ISO-8859-9 encoding.
> Look at the -encoding flag of the 'javac' compiler.
> In compilation the 8-byte characters in strings are converted to unicode
> characters.
> By default the encoding is probably ISO-8859-1.
> Regards,
> Tõnu

I tried, a few minutes ago, but the problem remains. I don't
know the usage of -encoding parameter in detail but,
I think it is related with the string constants in the 
source files. The main problem is the encoding when I read
a text file and show its contents in the jsp with something like,

<%= FileReader.readLine() %>

And as I mentioned, when I load a file and write it into another file, the encoding is correct.
The result of my string manipulation functions are correct. The single, devastating, problem
occurs when I pass a string with characters in ISO-8859-9, from a class to jsp.

Ah, <jsp:include also still is a problem .. :(

Himm .. It is a stupid thought but is it something to do with dynamic strings vs. static strings.
As far as I know when <%@ include.. is used the file is statically included,
at compile time, but <jsp:include.. may include the file dynamically after compilation.
Also the string constants in jsp files are compiled, but strings read from files are
read and generated in execution time .. Himmm .. I think I am going paranoic :) ..

Thanks, anyway .. Has anyone encountered this kind of problem before ??

Arif ..

View raw message