Hi !
I use jsdk 2.3 on W2K and UNIX. How do servlets containers (or jre 1.2.2)
determine my locale? Is there some property file ?
I run following code for output
...
printWin(out,str_out);
out.close();
...
public static void printWin(PrintWriter out,String str)
throws UnsupportedEncodingException
{
byte[] aBstr = str.getBytes("Cp1251");
for (int i = 0; i < aBstr.length; i++)
{
if(aBstr[i] < 0)
out.write(256 + (int)aBstr[i]);
else
out.write((int)aBstr[i]);
}
}
...
The W2K output is wrong but on UNIX is correct (codepage Cp1251).
Another way:
out.println(str_out);
The output on W2K is correct but on UNIX is wrong.
Best regards,
Roman Zvyaguintsev
mailto:[EMAIL PROTECTED]
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html