2

I saw this answer, The problem is - so I also need to know what type of encoder to use for getting the correct string - it may be in UTF\UTF8\ANSI.

Here is a example from the immediate window.

Encoding.Unicode.GetString(combinedBuf)
"믯ힿ힩힜힕�"
Encoding.UTF8.GetString(combinedBuf)
"שלום"
Community
  • 1
  • 1
Yacov
  • 1,060
  • 14
  • 27
  • 1
    I don't know that this makes sense. What you want is like asking a compiler to compile text and figure out whether it's in C, Java, or FORTRAN. – James Cronen Apr 15 '13 at 13:41
  • You should *somehow guess* the encoding. – I4V Apr 15 '13 at 13:42
  • 3
    I think what you want to do is detect which encoding was used? See the accepted answer here http://stackoverflow.com/questions/3404199/how-to-find-out-the-encoding-of-a-file-c-sharp – Cocowalla Apr 15 '13 at 13:49
  • @Cocowalla Put the answer and I will mark it as accepted - Or someone mark this as duplicate – Yacov Apr 15 '13 at 13:51

0 Answers0