Files having foreign symbols

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
There are foreign symbols in one of my html files, so the meta charset
must be:

<meta http-equiv="content-type" content="text/html; charset="gb2312" /
Quoted text here. Click to load it

But either online or off, the external css works well only when the
file is opened with the IE browser.  When it opened with FF, the
external css doesn't work at all.   No markup takes effect.  The file
is in:

Your help is greatly appreciated.

fulio pen

Re: Files having foreign symbols

In article

Quoted text here. Click to load it

You know that you have an inappropriate (for the doctype) " /> at
the end of your above meta line?

First thing to do is to fix up the errors in the mark up.


Re: Files having foreign symbols

Quoted text here. Click to load it

Also, in several places in the code, xhtml constructions such as <br /
Quoted text here. Click to load it
harm, but not always. Also a space before the "/" at the end of a tag
is required for an xhtml tag that does not have a closing tag in html.
I believe this space was required because some browsers had trouble
with this xhtml construction if no space here was used. I have not
checked recent browsers to see if any still have this problem. In this
case, the solution is simple. You just replace all of the self-
contained xhtml end tags such as <br /> with the proper one for html
4.01 used in this document such as <br>. If I remember correctly, you
do not need the space in a smil document which is somewhat more modern
code than early xhtml 1.0 and which usually is supported by a special
player/viewer rather than directly by a browser.

Re: Files having foreign symbols

Scripsit fulio pen:

Quoted text here. Click to load it

No, that's quite an incorrect idea. You should specify the character
encoding that has actually been used in the document. The encoding is
apparently UTF-16, so that's what you should specify. Actually, modern
browsers can infer UTF-16, so you could really mess things up if you used a
meta tag like the above. But you were lucky since your mistakes cancel each
out: you have a misplaced quotation mark, so that the meta tag has no
effect; the content attribute has the value
"text/html; charset="
and then gb2312 is taken as another attribute, and ignored because there is
no such attribute.

(By the way, a markup validator would have told all this, though somewhat
less clearly.)

("Foreign symbols"? Referring to Chinese characters as "foreign" in a
worldwide context is odd, since they are native characters to about one
billion people.)

Quoted text here. Click to load it

That's because FF has more adequate error processing. Remmber the extra
quotation mark? It also implies that the last quotation mark in

<meta http-equiv="content-type" content="text/html; charset="gb2312" /

actually starts a quoted string. This means that processing of quoted
strings gets off the phase and very wild, and the <link> element is not
really processed at all.

The immediate fix would thus be either to remove the meta tag or change it

<meta http-equiv="content-type" content="text/html; charset=utf-16" />

More advice:
1) Drop XHTML 1.0. You're not even using it formally correctly. Stick to
HTML 4.01, consistently. Use either XHTML or HTML 4.01; don't mix them in
the same file (you now even use both syntaxes in meta tags).
2) Switch to UTF-8, which is much better supported than UTF-16, especially
in search engines. This means changing your authoring program to change the
actual encoding _and_ declaring UTF-8 encoding in an HTTP header and/or a
meta tag.

Jukka K. Korpela ("Yucca")

Site Timeline