Encoding problem! RRS feed

  • Question

  • User-1305149166 posted

    I have a page with a lot of Chinese on it. There're 2 dropdown list boxes which are actually one servercontrol wrapped a lot javascript in it for cascading selection.

    On the page, all Chinese displayed fine except the chinese inside the 2 dropdowns!

    Here is the fact:

    1. The page is using utf-8 encoding, no doubt about it.

    2. It works fine in FireFox 2.0.

    3. It works fine in IE 6.

    4. It works fine on IE 7 on  one of my home laptop.

    5. But on my office laptop, and my co-woker's laptop, it does not work on IE7. Basically All Chinese looks fine except the one inside the dropdowns.

    I even download the page, examine the page html source in HEX format, the Chinese appear in the <select><option> is exactly the same as other Chinese on the page byte by byte!

    What the heck is wrong with IE7 or I missed any encoding requirement?

    my ascx/aspx are in utf-8 with signiture, my cs files are in utf-8, my database column is nvarchar,  not sure what else I need to do, especially it works with FireFox 2.0, IE 6. Just IE 7 on several machines.



    Wednesday, November 1, 2006 8:01 PM


All replies

  • User1416329745 posted

    You need more than Nvarchar in the database, and in SQL Server 2005 you can use collation with your DML(data manipulation language), the latin alphabet is just 26 letters the Chinese alphabet is more than two thousand characters so it is huge.  There are six Chinese defined in SQL Server 2005 just avoid BIN(binary sort) require case sensitivity and case sensitive code page.  The second link covers unicode in details because the .NET char is unicode by default but it is the nineth integer.  Post again if you still have questions, last year I helped Richard Xin with Chinese code page if I find the thread I will post it.   Hope this helps.




    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 1, 2006 8:55 PM
  • User766779634 posted

    You have to have the Chinese character-set installed on the computer where you are dipslying the information, else you will only se boxes.


    Friday, January 5, 2007 3:08 AM