views:

85

answers:

1

I'm trying to open a textfile and remove all the special chars ñ Ñ ' á í etc...

the file its a Layout that the clients send to me and i parse it to send the file to an AS400 server but i have to remove all special chars.

THE PROBLEM IS:

some files with some special chars when i open it in c# it read the special chars and Two different chars and move the entire line one space to the right and then the information that has to be in that position wont be OK.

i take the same file and open it in Notepad and the file is OK but when i open it in WordPad it looks like 2 chars (for just 1 especial char) Example: in the file i have:

"0001 0003JUAN PEÑA33441JPENATEST"

But in c# it shows

"0001 0003JUAN PEï░A33441JPENATEST"

im using the encoding 1251

any help?

A: 

I found a solution to know the Encoding of a file.

Read the next link:

http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=469

jmpena