RE: Unicode characters List instead of hexadecimal equivalent

From: Adisesha Neelaiahgari (
Date: Wed Aug 30 2006 - 00:08:07 CDT

  • Next message: Cristian Secară: "Re: Subj: MS outlook encoding & YahooGroups"

    Hi All,
    Thanks for your suggestions.
    I tried Convert.ToChar(System.Convert.ToInt32(value, 16)), working well for some unicodes. For ex: 29CA;TRIANGLE WITH DOT ABOVE;Sm;0;ON;;;;;N;;;;;
    29CB;TRIANGLE WITH UNDERBAR;Sm;0;ON;;;;;N;;;;; I could see only ⧊.
    I need to provide a set of unicode chars to admin in my application, where admin will select some chars as restricted. If any user wants to add new name having restricted chars then warning is displayed "Special character is not allowed as part of name, contact administrator". Now initial filling of unicode chars is required to display in GUI for admin, from sqlserver Database. Since I don’t have unicode DB, I am trying to create a table having unicode characters. I got the hex numbers from . These numbers must be converted to unicodes and then inserted in to database, to use them in my application. Below mentioned conversions are not working well for all unicodes to generate.

    --> Instead of reading this, converting and then inserting in to database, as James Cloos suggested (I could not see many chars for 02E5,02E6,02E7,02E8,02E9,02EA [ ˪]MODIFIER LETTER YIN DEPARTING TONE MARK) if we have any .txt file having unicode characters, then it will be imported directly in to database with out conversion logic.

    Please let me know whether requirement is clear.


    -----Original Message-----
    From: Dean Harding []
    Sent: Wednesday, August 30, 2006 10:07 AM
    To: Adisesha Neelaiahgari; 'James Cloos'
    Subject: RE: Unicode characters List instead of hexadecimal equivalent

    > (Microsoft.VisualBasic.ChrW(System.Convert.ToInt32(hex, 6))

    If you want to do the .NET way, just do:

    string value = "3df";
    char ch = (char) Convert.ToInt32(value, 16);

    Now, because in .NET a char is actually a UTF-16 codepoint, you won't get
    anything > U+FFFF. And also, this doesn't take into account unassigned or
    invalid codepoints and stuff (unless you're getting your input data from the
    Unicode database already)

    But my question is, what are you going to do with it then? Most likely you
    won't be able to DISPLAY most of those characters, unless you have the
    correct fonts installed, so what are you actually trying to DO?


    This archive was generated by hypermail 2.1.5 : Wed Aug 30 2006 - 00:10:58 CDT