I have a string
"\u00c7"
I can convert it in code;
char chr = Convert.ToChar("\u00c7"); // value of the chr is **Ç**
but I can't convert like this
I wrore \u00c7 in textbox1
char chr2 = Convert.ToChar(textbox1.Text); //This makes an error - number of character
I'm working on it for hours and can't find any solution.
\u00c7into the textbox? If so, that’s not the same as writing it this way in code as the backslash is an escape character. In code if you type \u this means that the next characters are a Unicode code point and that the compiler should convert the whole sequence to a single character. In a textbox you are literally writing a backslash followed by an u and some numbers/letters, so here it’s actually a sequence of six characters. The same would happen if you disable the escaping by writing"\\u00c7"or@"\u00c7"in code.\uis for a UTF-16 code unit. C# doesn't have escapes for Unicode codepoints like JavaScript and HTML do.