There is no bug that prevent to setting Russian encoding by
res.setContentType("text/html; charset=Cp1251").
All my servlets output russian without any problem.

There is some problems with input from html forms.

Vyacheslav Pedak

----- Original Message -----
From: Gleb Koukhta <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 07, 2000 9:21 PM
Subject: Re: [NES-MANAGERS] Troubles with the russian language in servlets


> Hi, Vitaly !
>
> Thank you. I see, it isn't possible set content type using
> res.setContentType("text/html; charset=Cp1251"), because of bug in the
> Java SDK 1.2.2 :(
> Do you know how to escape from replacing to question signs all cyrillic
> input in forms ? It's also in trouble :(
>
> Gleb.
>
> Vitaly Yermolenko wrote:
> >
> >     Hi, Gleb!
> >
> >     Code, like below, is eatable as for Explorer as for Netscape!
> > For Russian (and Ukrainian) letters NO problems also!
> >
> >     public void service (HttpServletRequest req, HttpServletResponse
res)
> >     throws ServletException, IOException
> >     {
> >         String strJCharSet = "Cp1251";
> >         res.setContentType ("text/html");
> >         PrintWriter out = new PrintWriter (new BufferedWriter (new
> > OutputStreamWriter (res.getOutputStream (), strJCharSet)));
> >         out.println ("<HTML><HEAD>" +
> >                              "<META http-equiv=\"Content-Type\"
> > content=\"text/html\";charset=windows-1251\">" +
> >                              "<TITLE>����!</TITLE></HEAD>" +
> >                                .    .    .    .    .
> >                              "</HTML>");
> >        out.close ();
> >      }
> >
> > Regards,
> > Vitaly.
> >
> > ----- Original Message -----
> > From: Gleb Koukhta <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, April 07, 2000 3:27 PM
> > Subject: Re: [NES-MANAGERS] Troubles with the russian language in
servlets
> >
> > > I has tried, but did not succeed - I'm getting wrong charset
iso-8859-1
> > > in the Netscape 4.72 and correct Cp1251 in the Microsoft Internet
> > > Explorer 4.0 and 5.0.
> > >
> > > Gleb.
>
>
___________________________________________________________________________
> 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
>

___________________________________________________________________________
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

Reply via email to