Re: help with javascript + embedding + japanese characters

"drumminj" <[email protected]> 12 Jun 2006 12:47:46 -0700
Newsgroups gmane.comp.mozilla.internationalization
Organization http://groups.google.com
Message-ID <[email protected]>
Well, this seems to give some insight, but is talking about another use
case
(http://developer.mozilla.org/en/docs/International_characters_in_XUL_JavaScript).
 Since I'm working with Mozilla 1.7.5 source branch, mozilla will treat
the characters as ASCII and will not accept UTF-8 unless it is escaped.
 The question is, is this true for my situation as well?

J

drumminj wrote:
> Hopefully someone here can help me get my head around an issue I'm
> having trying to internationalize our content for Japanese.  The core
> of the issue is that we have web content that is a mix of JavaScript
> and HTML.  We have an external javascript file that holds a simple
> variable definition which is the string representation of the install
> path.  We need to be able to represent non-ASCII characters in this
> file (we're running into an issue with Japenese).
>
> What is it that determines what text/character encoding should be used
> in this file?  I'd rather not rely on any heuristic/interpretive
> algorithm that guesses at the character encoding.  Everything seems to
> work if the characters are escaped UTF-8, but I'd like to understand
> why.  Does the charset of the HTML document that essentially "includes"
> the external .js file determine how the bytes are interpreted?  Is
> there some standard that I can't seem to find documented?
>
> Please note that I'm a C developer who is handling the embedding of
> mozilla, not a web/HTML/Javascript coder nor the one who has written
> the installer script (which is in Perl on the mac platform and a
> compiled C++ program on windows...ugh), but I have enough knoweldge of
> them to discuss these elements.
> 
> Any help/insight is greatly appreciated.
> 
> J