How to recognize code page of input string, for example if I put something in Cyrillic it should return windows-1251 and when I put string in Chinese it return other code page etc
-
Related question - stackoverflow.com/questions/90838/…Oded– Oded2010-07-28 08:10:20 +00:00Commented Jul 28, 2010 at 8:10
-
It's not just related, it looks like the same question. The only difference is the source of the characters.cHao– cHao2010-07-28 08:26:19 +00:00Commented Jul 28, 2010 at 8:26
Add a comment
|
1 Answer
If this is an input from a textbox (windows forms) the string is a .Net string, and is always in unicode (UTF-16).
If you get the input from a Web form (aspx) page, the browser also sends the codepage with it. And .Net will make it unicode for you.
If you get the input from a file, I wish you good luck ;-).