Tuesday, 5 July 2016

c# - byte[] to string without knowing the coding

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)
"שלום"

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...