H
Heandel
Hello,
I have an application that extracts ASCII strings from a binary file
(characters from 0 to 255). Depending on the windows code page of the user,
the characters above 127 do not "mean" the same : that is normal.
My problem now consists in saving that string in text format while keeping
every character on a BYTE and not .Net CHAR
Example :
Let's say a russian guy uses my program, the tool extracts C0 F0 E3 E5 ED F2
00.
(Assuming buffer contains the binary data, this is how I extract the string
: )
StringBuilder sb = new StringBuilder();
for (int i = 0; i < buffer.Length; i++)
sb.Append((char)buffer);
Now I want to save it in TEXT format and I get this in the text file : D1 8E
D0 9F D0 A6 D0 95 D0 9C D0
I want to write the same string I read !
Can anyone help me ?
Thanks,
Heandel
I have an application that extracts ASCII strings from a binary file
(characters from 0 to 255). Depending on the windows code page of the user,
the characters above 127 do not "mean" the same : that is normal.
My problem now consists in saving that string in text format while keeping
every character on a BYTE and not .Net CHAR
Example :
Let's say a russian guy uses my program, the tool extracts C0 F0 E3 E5 ED F2
00.
(Assuming buffer contains the binary data, this is how I extract the string
: )
StringBuilder sb = new StringBuilder();
for (int i = 0; i < buffer.Length; i++)
sb.Append((char)buffer);
Now I want to save it in TEXT format and I get this in the text file : D1 8E
D0 9F D0 A6 D0 95 D0 9C D0
I want to write the same string I read !
Can anyone help me ?
Thanks,
Heandel