Decode S-JIS string to UTF-8

Posted by user566613 on Stack Overflow See other posts from Stack Overflow or by user566613
Published on 2011-01-07T08:28:14Z Indexed on 2011/01/07 9:54 UTC
Read the original article Hit count: 165

Filed under:
|

Hi,

I am working on a Japanese File and I have no knowledge of the language. The file is encoded in S-JIS. Now, I am supposed to convert the contents into UTF-8 so that the content looks like Japanese. And here I am completely blank. I tried the following code that I found somewhere on Internet but no luck:

byte[] arrByte = Encoding.UTF8.GetBytes(arrActualData[x]); string str = ASCIIEncoding.ASCII.GetString(arrByte);Can anyone help me with this?

Thanks in advance Kunal

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about c#-4.0