Hello to everyone!!
I'm new to this forum and is my first day with .NET...
I'm making an aplication to read a file, it's a binary file with some text is spanish, so it has some tildes and ñ.
The file is "wrong encoded" it is done with the "new" windows ASCII code.. I'll try to explain.
The ASCII code for "ú" is 163, for "é" 130, etc...
but in the windows Char Map the code for ú is 250 and for é is 233, the file is encoded this way with this annoying codepage.
I opened the file as a FileStream and use a BinaryReader object to read it.
Here is the problem, I want to convert those chars to their real value, I think it can be done with System.Text.Encoding.ASCII.GetChars but instead of ascii I get a "?".
Anyone can help me with this??
Here i will show you what i have tested:
--
Bye,
Ronq.
I'm new to this forum and is my first day with .NET...
I'm making an aplication to read a file, it's a binary file with some text is spanish, so it has some tildes and ñ.
The file is "wrong encoded" it is done with the "new" windows ASCII code.. I'll try to explain.
The ASCII code for "ú" is 163, for "é" 130, etc...
but in the windows Char Map the code for ú is 250 and for é is 233, the file is encoded this way with this annoying codepage.
I opened the file as a FileStream and use a BinaryReader object to read it.
Here is the problem, I want to convert those chars to their real value, I think it can be done with System.Text.Encoding.ASCII.GetChars but instead of ascii I get a "?".
Anyone can help me with this??
Here i will show you what i have tested:
Visual Basic:
'The string is "aécX"
'With this
Temp=r.ReadChars(3)
'I get Temp = "acX"
'With this
Temp=Encoding.ASCII.GetChars(r.ReadBytes(3))
'I get Temp = "a?c"
'I want to get Temp = "aéc"
--
Bye,
Ronq.