Hi!
I has tried this way. It works only with Internet Explorer, not with
Netscape, because of incorrect ACCEPT-CHARSETS - en,*,UTF-8. Internet
Explorer doesn't send ACCEPT-CHARSET in a HTTP request.
Gleb.
Vitaly Lipovetsky wrote:
>
> You have to call
>
> setContentType(response);
>
> before call
>
> PrintWriter out = getWriter(response);
>
> or
>
> getOutputStream().
>
> manadatory.
>
> I read such an information in servlets documentation.
>
> Dmitri Namiot wrote:
>
> > try to change capitalization:
> >
> > res.setContentType("text/html";charset=windows-1251");
> > ^^ small w
>
> Everything is OK. Look at my method
>
> protected void setIcontentType(String newValue)
> {
> icontentType = newValue != null ? newValue.replace('@', ';') : "text/html;
> charset=windows-1251";
> }
>
> >
> > you can use also Cp1251.
> >
> > > Hello, everybody !
> > >
> > > I has changed text to russian in the sample servlet HelloWorldServlet,
> > > which one is coming with iPlanet webserver 4.1 ,recompiled and installed
> > > it. Instead of the russian text I'm getting only question signs in the
> > > Netscape Communicator. Problem is, that servlet's output depends on the
> > > HTTP ACCEPT-CHARSET sent from communicator in the HTTP GET request, but
> > > it is wrong for Russia(en,*,UTF-8) and can't be changed from GUI, only
> > > in the prefs.js file, what is confusing for users on Internet. If one
> > > will edit file prefs.js or connect from the Microsoft's Internet
> > > Explorer he will see a russian text.
> > > In the beginning of doGet I has set locale:
> > > Locale MyLocale=new Locale("ru","RU");
> > > res.setLocale(MyLocale);
> > > file://Then I has set content type:
> > > res.setContentType("text/html; charset=Windows-1251");
> >
> > ServletShop: java server side programming
> > http://coldjava.hypermart.net
> >
> > ____________________________________________________________________
> > Get your own FREE, personal Netscape WebMail account today at
>http://webmail.netscape.com.
> >
> > ___________________________________________________________________________
> > 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
>
> --
> My best regards,
> Vitaly Lipovetsky.
> Deputy head of IT division
> First Ukrainian Intl bank
>
> Brainbench(Tekmetrix) e-certification id 14050 SYBASE DBA 4.38
> Brainbench(Tekmetrix) e-certification id 14050 MS SQL Server DBA 4.51
>
> ___________________________________________________________________________
> 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
S/MIME Cryptographic Signature