Hi,

HTML allows you to use tag  attribute "LANG"
witin almost all enclosing tags:
<ANYTAG LANG=ro> Text Romanesc </ANYTAG>

"ANYTAG" can be P, FONT, BODY, TD, TR, TABLE, and more...

So brower will know wich parts of the document contain
the language you want.

Cezar

On Thu, 22 Apr 1999, Vika Pobilytza wrote:

> Hi all.
>
> Im sorry, if this question does't concern this conference.
> I can't receive the ask from developer (PROGRESS Apptivity).
>
> I have the following problem:
>      there  are *.html files are containing Java API instances.
> These instance are intened for work with Database (on the main).
> I.e. JDBC-ODBC is used.
>
> I can't obtain for data from database and HTML text   look in same code
> page.
>
> That is, if I'm  writing  in servlet res.setContentType("text/html;
> charset=Cp1251");
> (res is HttpServletResponse parameter from
>      public void service(HttpServletRequest req, HttpServletResponse res)),
> then any text from *.html is being wrote in Russian is looking OK, but
> any data from database as '?'.
> And on the contrary, if I use   res.setContentType on default (it's
> ISO-8859-1),
> then  any text from *.html is being wrote in Russian is looking as '?',
> but
> any data from database OK.
>
> What about JDK, I use 1.1.7B.
>
> If I try to convert  out stream in servlet:
>            PrintWriter out = new PrintWriter(
>                                               new
> OutputStreamWriter(res.getOutputStream(), "Cp1251"),
>                                            true);
> I get the next error during the runnig:
> java.lang.IllegalStateException: can't mix text and binary input
>         at sun.servlet.http.HttpResponse.getWriter(HttpResponse.java:628)
>         at intershopServlet.service(intershopServlet.java:176)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
>         at
> sun.servlet.http.HttpServerHandler.sendResponse(HttpServerHandler.java:165)
>         at
> sun.servlet.http.HttpServerHandler.handleConnection(HttpServerHandler.java:1
>
> 21)
>         at sun.servlet.http.HttpServerHandler.run(HttpServerHandler.java:90)
>         at java.lang.Thread.run(Thread.java:466)
>
> By the way for out of data servlet use two streams PrintWriter and
> ServletOutputStream.
>
> I realize, that something is wrong in
>   WebBrowser (Cp1251) <-- servlet(Unicode)  <-- *.html (Cp1251),
> but how it may be overcome, I don't know.
>
> Could somebody tell me, what I  must do, and where I'm wrong?
> With respects.
> Vika.
>
> ___________________________________________________________________________
> 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
>


Cezar Totth                             email:  [EMAIL PROTECTED]
                                        Fax:    (401) 220 33 95
Genesys Software Romania                Phone:  (401) 638 49 44
Stefan Furtuna 169, sect.6
cod 77171, Bucharest
Romania

___________________________________________________________________________
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