Subj : Re: unescape(string in unicode language) does not work in Netscape To : netscape.public.mozilla.jseng From : Martin Honnen Date : Mon Jan 20 2003 06:25 pm Harald Albrecht wrote: > David Bradley wrote: > >> Jiong Feng wrote: >> >>> I tried to use unescape on some string in Chinese, Japanese, or Greek. >> >> Sounds like http://bugzilla.mozilla.org/show_bug.cgi?id=44272 > > > Is this problem also related to the current situation that Mozilla reads > in JavaScript sourece files as ASCII and does not care, for instance, > about UTF-8? Or is this an error of myself? > > Background: I have a simple JavaScript file declaring a string > containing some UTF-8 characters, like "您好". But when I try to display > this string (alert() or similiar) the two idiographs have been falling > to pieces and are displayed as four ASCII letters. > I save the following as UTF-8: var s = "€ 300 ÜÄÖ"; alert(s); and then save a HTML page as UTF-8 with the following escape depending on document charset then the alert displays just fine -- Martin Honnen http://JavaScript.FAQTs.com/ .