Sameer

Sameer

  • NA
  • 1
  • 0

Problem in Reading Binary File

Feb 12 2009 7:13 AM

Hello all,

I'm trying to read Binary file that contains English as well as some Japanese string like (D001-English &  ????- Japanese).

I'm using following code to do this:

"symbolName = Encoding.Unicode.GetString(binaryReader.ReadBytes(stringLength));"

I can successfully read Japanese string but for English strings, same code gives some garbage value.

If I used

"SymbolName = new string(binaryReader.ReadChars(stringLength));"

it will give me English string correctly, but not Japanese strings.

So, how to read this type of binary file?

Thanks.

Sam


Answers (1)