----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Sergiy Vasylyev wrote:
> As far as I know Java stores everything as Unicode in .class files 

That's correct.

> so there is no need to specify anything at compile time. 

That's completely uncorrect. The .jsp or .java files are
text files in some 8-bit encoding, so Strings specified
inside these files need to be converted into UNICODE by the
java compiler. If you do nothing, then the default encoding is used,
which depends on the operating system current locale.
Otherwise you can specify encoding by

javac -encoding windows-1251 MyClass.java

> Two things I wanted to add,
> first, I checked generated .from JSP Java files(servlets) and they still
> have correct chars(encoding), second, the same code works fine on another
> host provider!

Probably the other provider has another OS locale.
On UNIX check LC_ALL variable, on NT check 'Regional settings'.

So if you compile your servlets on an NT machine, you probably
have corect locale setting, but if you compile them on a UNIX box,
the locale is not set correctly. Also beware that windows-1251
encoding is used for cyrillic on NT, but on UNIX it is ISO-8859-5 !

> I am wondering is there any Apache conf file(s) that I should double check
> !? I am new to Apache/JServe please help.

Sure, you have to provide correct locale to the javac command.

Martin


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search Archives: 
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to