UTF-8 JavaScript files
- From: Hans-Georg Michna <hans-georgNoEmailPlease@xxxxxxxxxx>
- Date: Sat, 03 Jul 2010 21:03:39 +0200
I'm having a problem with a UTF-8 HTML page containing a
<script> tag that calls in a JavaScript file that is also
encoded in UTF-8.
The JavaScript program, among other things, contains a string
literal, which contains an umlaut, and dynamically puts the
string into an HTML tag. But the umlaut is not displayed
properly and displays as a little square box instead. What could
be the cause of this problem?
Am I right in assuming that a JavaScript file inserted by means
of the <script> tag is interpreted as being encoded in the same
character set as the HTML page itself? If so, then I have to
search for the error elsewhere.
I haven't gotten to any more thorough analysis yet. Thought I
should ask here first, just in case there are a few well-known
potential causes.
Hans-Georg
.
- Follow-Ups:
- Re: UTF-8 JavaScript files
- From: Hans-Georg Michna
- Re: UTF-8 JavaScript files
- From: Hans-Georg Michna
- Re: UTF-8 JavaScript files
- From: Dr J R Stockton
- Re: UTF-8 JavaScript files
- From: Jukka K. Korpela
- Re: UTF-8 JavaScript files
- From: johncoltrane
- Re: UTF-8 JavaScript files
- From: Richard Cornford
- Re: UTF-8 JavaScript files
- Prev by Date: Re: Decimal to Binary
- Next by Date: Energy Saving Tips
- Previous by thread: Sound-synched movie
- Next by thread: Re: UTF-8 JavaScript files
- Index(es):
Relevant Pages
|