1

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

2
  • Related question - stackoverflow.com/questions/90838/… Commented 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. Commented Jul 28, 2010 at 8:26

1 Answer 1

2

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 ;-).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.