Jump to content
Xtreme .Net Talk

RonQ

Avatar/Signature
  • Posts

    28
  • Joined

  • Last visited

Everything posted by RonQ

  1. RonQ

    Convert string

    How can i get the code page?? it isn't in the file im using, and also i think is a standart windows codepage, because for example the nfo files that uses the "bad boys", can't be read as well.
  2. I don't know much of C# but maybe the problem is solved replacing the "\033" to "\\033" did you try that? I also heard that C# has a new feature with strings that if you put before the string an @ it will be taken without escape characters or something like that im not sure about the last thing but you can try like @"\033". -- Bye, Ronq.
  3. 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: '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. ;)
×
×
  • Create New...