Forum Moderators: open

Message Too Old, No Replies

display chinese chars in title tag - firefox does not do so

chinese chars utf-8 title html

         

webaster

3:16 pm on Jun 15, 2005 (gmt 0)

10+ Year Member



Why does eg Firefox (my system: WIN2000PRO) display chinese body text just fine but the title tag of the pages display plain squares? it is done with UTF-8 encoding

Example code:
<code>

<html>

<head><title></title></head>

<body>

</body>
</code>

choster

4:24 pm on Jun 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The <title> is rendered as the name of the window, and the font used in the browser "chrome" is dependent on the system. So my guess is that the system font you are using lacks glyphs for the characters in question. You can modify this setting from the Windows control panel under

Display -> Appearance -> Font

webaster

5:46 pm on Jun 15, 2005 (gmt 0)

10+ Year Member



nothing to do with that

a windows system let y ssay XP has a language pack that installs at elat oen chinese font. I have installed at leat one chinese font. If one would use notepead to save a chinese text with char encoding UTF-8 for instance. All works fine except if I make a html page from the txt - i included the proper metatags for the encoding - and the body text in chinese chars dispalys just fine only the title tag - as you mentioned the topbar of a window that displays the title does not display them - just squares. When using a mac and look in Safari there it works all just fine.

choster

7:01 pm on Jun 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



OK. What about Firefox's settings under Tools -> Options -> General -> Fonts & Colors -> Unicode?

g1smd

7:08 pm on Jun 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




Is the page character encoding actually declared in the meta tags? It should be.

Check to see if a different character encoding already appears in the HTTP header. You'll need WebBug, or similar, for that.

encyclo

7:12 pm on Jun 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you are declaring the charset in a meta tag, is it before or after the
title
element?

webaster

12:21 pm on Jun 18, 2005 (gmt 0)

10+ Year Member



The HTML is ok ... It is due to the windows system fonts.

I guess that even when a <title></title> is a genuine HTML tag. The system you are using has to be set to be able to read these cahrs too. Unlike the body text has no problem with that whatsoever if the right meta charset is included.
The text formatting if used simplified Chinese saved as UTF-8. And of course a meta header set to charset UTF-8 is included in the HTML. Even in Windows all the body text where chinese chars are included display just fine.

That is all. It is not a browser issue ... this time.