Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2007
    Thanked 0 Times in 0 Posts

    Special characters in a list

    Hi all,

    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>&#25248 ;</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('&#25248 ;', 0);
    list.options[0] = newOption;
    This works with Firefox and IE but it displays &#25248 ; 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 &amp; ;-). I could have a correct preview by using &# 38 ; instead of &amp; 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 &#25248 ; ) without a whitespace, the smiley is interpreted before the character itself... this all looks like a lot of fun to come...

  2. #2
    New Coder
    Join Date
    Jul 2005
    Thanked 0 Times in 0 Posts
    Hi, i'll put special characters in a xml file(utf-8 encoded) after that i'll read them with javascript or php and show them.
    If you can not find a decision, maybe you have to try to change a problem



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts