My website deals with Chinese characters (http://caractereschinois.free.fr
) and I have trouble displaying them in a list.
I used to be able to do it by using innerHTML like for example:
list.innerHTML = '<option>抠 ;</option>';
but it turned out that IE did not like it. However this way of dealing with a special character was correctly displayed with Firefox, Safari and Konqueror.
So I switch to a nicer way of creating options in a list:
var newOption = new Option('抠 ;', 0);
list.options = newOption;
This works with Firefox and IE but it displays 抠 ; and not the character ( 抠 ).
How would you do?
PS: The text in the option is actually a long string with special characters in formatted with &#/;. I do not really want to have to interfere with the string itself.
PPS: it was really tricky to get this post to be displayed correctly since every html code is interpreted but & ;-). I could have a correct preview by using &# 38 ; instead of & but I could not get it correct after submitting (a first processing turned it into something that was interpreted as the character itself). I have the opposite problem if I write 抠 ; ) without a whitespace, the smiley is interpreted before the character itself... this all looks like a lot of fun to come...