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
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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 ;-).