RE: Displaying Chinese on HTML

From: Ayers, Mike (Mike_Ayers@bmc.com)
Date: Thu Jul 06 2000 - 13:22:43 EDT


        Please be kind and make sure not to send messages in HTML format.
Thank you. Comments below.

From: Parvinder Singh(EHPT) [mailto:P.Singh@ehpt.com]
Sent: Thursday, July 06, 2000 12:23 AM

>Hello friends,
>I am using Unicode(utf-8) to store data in Oracle database
>(database character set is UTF-8).
>In one of columns of the table,I have stored data in Chinese
>in UTF-8 format.
>Now I want to retrieve it on HTML page through java Servlet
>using JDBC.
>I have used html tag <meta content=text/html charset=UTF-8>
>I use Netscape navigator 4.6 and have set the character set as
>UTF-8 in browser. I also have lot of chinese fonts in browser
>but I don'nt know which one to choose. Anyway I tried various
>combinations but chinese never got displayed !

        I pointed my browser to
http://www.trigeminal.com/samples/provincial.html, which gives samples of
text in a whole bunch of languages, courtesy of Michael Kaplan. I found
that Netscape (I have 4.7) fails to display many of the lines, while
Explorer (5.00) shows every one for which I have a font (I am doing this
from NT4SP5). I have not yet investigated why Netscape isn't rendering
(hints, snyone?). I suggest you try reading your pages with Explorer first.
This may help you identify that you have valid pages. Use the above link to
"calibrate" your browsers first!

>The html page shows inverted question marks as output !!!

        This is expected behavior, I think. I get hollow boxes for the
unrenderable characters, but I've heard of other people getting question
marks. I do not know if the question marks and hollow boxes each mean
something different, though.

>Can somebody help in displaying the desired language.
>Also while accepting chinese or any language from HTML,do my
>servlets code need to change ? Or will it automatically >convert
>it from HTML's UTF-8 input to UCS2 and transparently insert
>the string into Oracle database as UTF-8 using JDBC !

        If you're reading it in as UTF-8 and storing it as UTF-8, why do you
want to convert it? Am I missing something?

>King regards,

        Is King your dog? ;-)

        HTH,

/|/|ike

>Parvinder
  



This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:21:05 EDT