IE7 Does Not Support Some Unicode?

V

vunet.us

Hello,

I translate a website into multiple languages. My AJAX app displays
Unicode characters successfully. One problem, however, is that Chinese
Unicode characters are shown as boxes in HTML select fields in IE7
(not IE6, FF, etc.).
I used UTF-8 encoding set both on the server and in meta tags: it
still does not work.

Since I have no external server, please refer to this copy/paste code
below to clearly see the problem. Please, open in IE7 for problem
demonstration.
Thank you.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
function f()
{
var selObjArray = new Array();
selObjArray.push(new Array( "\u67E5\u627E\uFF01", "Look Up"));
selObjArray.push(new Array( "\u9875\u9762\u6D4F\u89C8", "Page
View"));
var select = getPrefSelectObj(selObjArray);
document.getElementById("myDiv").appendChild(select);
}
function getPrefSelectObj(arr){
var s = document.createElement("select");
try{
for(var i=0; i<arr.length; i++){
var vals = arr;
var option = document.createElement("option");
option.text = vals[0];
option.value = vals[1];
if (document.all){s.add(option);
}else{
s.add(option, s.options);}
}
}catch(e){}
return s;
}
</script>
</head>
<body onload="f();">
<div id="myDiv"></div>
</body>
</html>
 
D

David Mark

Hello,

I translate a website into multiple languages. My AJAX app displays
Unicode characters successfully. One problem, however, is that Chinese
Unicode characters are shown as boxes in HTML select fields in IE7

That indicates the required fonts aren't installed or your system is
not configured to display them.
(not IE6, FF, etc.).
I used UTF-8 encoding set both on the server and in meta tags: it
still does not work.

Because that isn't the problem.
Since I have no external server, please refer to this copy/paste code
below to clearly see the problem. Please, open in IE7 for problem
demonstration.

That won't do any good. I probably don't have the fonts either.
Which raises the question of which font(s) are required to display
these characters. Why is there no style sheet?

Anyway, this is certainly not a JS problem.
 
D

dave

Hello,

I translate a website into multiple languages. My AJAX app displays
Unicode characters successfully. One problem, however, is that Chinese
Unicode characters are shown as boxes in HTML select fields in IE7
(not IE6, FF, etc.).
I used UTF-8 encoding set both on the server and in meta tags: it
still does not work.

Since I have no external server, please refer to this copy/paste code
below to clearly see the problem. Please, open in IE7 for problem
demonstration.
Thank you.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
function f()
{
var selObjArray = new Array();
selObjArray.push(new Array( "\u67E5\u627E\uFF01", "Look Up"));
selObjArray.push(new Array( "\u9875\u9762\u6D4F\u89C8", "Page
View"));
var select = getPrefSelectObj(selObjArray);
document.getElementById("myDiv").appendChild(select);}

function getPrefSelectObj(arr){
var s = document.createElement("select");
try{
for(var i=0; i<arr.length; i++){
var vals = arr;
var option = document.createElement("option");
option.text = vals[0];
option.value = vals[1];
if (document.all){s.add(option);
}else{
s.add(option, s.options);}
}
}catch(e){}
return s;}

</script>
</head>
<body onload="f();">
<div id="myDiv"></div>
</body>
</html>


I do have the Asian fonts installed and it works just fine for me.

This is not a JS issue though, rather its an issue with your
computer's set up and the fonts that are installed
 
V

vunet.us

I translate a website into multiple languages. My AJAX app displays
Unicode characters successfully. One problem, however, is that Chinese
Unicode characters are shown as boxes in HTML select fields in IE7
(not IE6, FF, etc.).
I used UTF-8 encoding set both on the server and in meta tags: it
still does not work.
Since I have no external server, please refer to this copy/paste code
below to clearly see the problem. Please, open in IE7 for problem
demonstration.
Thank you.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
function f()
{
var selObjArray = new Array();
selObjArray.push(new Array( "\u67E5\u627E\uFF01", "Look Up"));
selObjArray.push(new Array( "\u9875\u9762\u6D4F\u89C8", "Page
View"));
var select = getPrefSelectObj(selObjArray);
document.getElementById("myDiv").appendChild(select);}
function getPrefSelectObj(arr){
var s = document.createElement("select");
try{
for(var i=0; i<arr.length; i++){
var vals = arr;
var option = document.createElement("option");
option.text = vals[0];
option.value = vals[1];
if (document.all){s.add(option);
}else{
s.add(option, s.options);}
}
}catch(e){}
return s;}

</script>
</head>
<body onload="f();">
<div id="myDiv"></div>
</body>
</html>

I do have the Asian fonts installed and it works just fine for me.

This is not a JS issue though, rather its an issue with your
computer's set up and the fonts that are installed


I mentioned the problem was in select boxes. If I added those unicode
characters to the page, it worked fine. That's why I thought this
could be JS problem, since my JS puts them as text value into select
options (see function getPrefSelectObj).

Anyway I spent some time working on it too and found out that charset
had to be changed to gb2312 from utf-8. That was the solution.

Thanks everyone trying to help.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top