Mozilla, Javascript and UTF-16

K

Krishna Kirti Das

I have an UTF-16 encoded HTML document that uses this to link to an
external javascript file:
<html><head>
<link href="myjsfile.js" type="text/javascript" charset="UTF-8">
</head>
<body>
..
..
..

Works fine in IE, but not in Mozilla, no matter what charset I try.
Has anyone run into this before? If so, what did you do that worked?
 
M

Martin Honnen

Krishna said:
I have an UTF-16 encoded HTML document that uses this to link to an
external javascript file:
<html><head>
<link href="myjsfile.js" type="text/javascript" charset="UTF-8">
</head>
<body>
.
.
.

Works fine in IE, but not in Mozilla, no matter what charset I try.
Has anyone run into this before? If so, what did you do that worked?

Why don't you use
<script type="text/javascript" src="myjsfile.js" charset=UTF-8"></script>
? I have never seen anyone use the link element to use script files.
 
K

Krishna Kirti Das

Why don't you use
<script type="text/javascript" src="myjsfile.js" charset=UTF-8"></script>
? I have never seen anyone use the link element to use script files.

That seems to work just fine. Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top