[Fwd: Re: UTF-8 code in HTML]

From: Mark Davis (markdavis@ispchannel.com)
Date: Thu Apr 13 2000 - 10:00:00 EDT

-------- Original Message --------
From: Mark Davis <markdavis@ispchannel.com>
Subject: Re: UTF-8 code in HTML
To: Otto Stolz <Otto.Stolz@uni-konstanz.de>

Thanks for taking a look at this for me. I think what is happening is that JavaScript on your browser is not Unicode-enabled, so anything above 00FF is getting turned into a question mark when the script does a write().

I guess I could work around that -- IF I can think of a nice way to detect it -- by transforming the Unicode character into the sequence of UTF-8 bytes for those browsers (since the chart script itself has a UTF-8 converter, that's simple to do). However, if your JavaScript in your browser is not Unicode-enabled, I'm guessing that the browser itself is not, so that would make the exercise moot.

I did modify the pages to add the DOCTYPE, and even validated the three pages using the w3c validator (except for one item: apparently HTML 4.0 does not allow a name attribute on a form; and I use that name in my script -- however, I don't think that is the cause of this problem).

Anyone else on UNIX have any luck with http://www.macchiato.com/unicode/charts.html?


Otto Stolz wrote:

> Am 2000-04-12 um 16:38 h GMT hat Mark Davis geschrieben:
> > http://www.macchiato.com/unicode/charts.html
> ...
> > it does not work with IE on the Mac. [...] It works ok with both NN and
> > IE on Windows. I don't know how it works on Unix
> Am 2000-04-13 um 10:23 h hat Otto Stolz geschrieben:
> > I think, the problem lies with the root page of your frame set (viz.
> > charts.html), which declares itself as being HTML 3.2, and has no
> > Content-Type Meta tag.
> Now I have re-gained access to your page and found that the reason for
> the malfunction has to be sought elsewhere.
> The HTML generated by your Java-Script on my NN 4.7 under IRIX64 version 6.5
> contains a genuine question mark instead of any character above the Latin-1
> range. Now, I think, these question marks are generated by the
> String.fromCharCode function you are invoking from your htmlChar function.
> This undesired behaviour remained after I have amended a copy of your
> charts.html with the HTML 4.0 DOC declaration, and the UTF-8 Meta tag,
> as suggested in my recent note. Also, amending a copy of your charts.js
> with
> doc.writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
> Transitional//EN">');
> did not help.
> I am giving up, now. I hope, some real Netscape insider will provide a
> solution, which will be posted in the Unicode list.
> Best wishes,
> Otto Stolz

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