Replacing accent characters when reading writing csv files
Posted on 2008-10-10
I am reading "certain" field values from several different csv files and combining these files into 1 csv file. I have to format the values slightly before I add them to my master csv file because it will eventually be imported into SQL at a later date, mainly I just need to truncate the values so that the SQL import process won't complain.
The problem I am running into is when a value has accent characters. For instance I have a value of
LA CITÉ. So one of the things I do is replace É with E and if I MessageBox this, it works just as expeced. However when I look at the master file after all the files have been processed, the value that actually got saved is LA CITÃ0 rather than LA CITE.
Any idea why this is happening and what I can do about it? I am on .NET 1.1