J
jcsnippets.atspace.com
Hi everybody,
I'm trying to read a file containing a list of addresses. Most of these
addresses are based in Germany, so there are a lot of names which have
special characters like München and the ever-present "Straße".
The code is as follows:
FileStream fs = new FileStream(fi.FullName, FileMode.Open);
StreamReader sr = new StreamReader(fs, Encoding.Default);
As you can see, I'm using Encoding.Default here - I have tried all
available encodings that are available through Encoding, but none of them
returns the text as expected.
Is there another way to read the file? What can I change to make sure these
special characters are still read and processed?
Thanks in advance,
JayCee
I'm trying to read a file containing a list of addresses. Most of these
addresses are based in Germany, so there are a lot of names which have
special characters like München and the ever-present "Straße".
The code is as follows:
FileStream fs = new FileStream(fi.FullName, FileMode.Open);
StreamReader sr = new StreamReader(fs, Encoding.Default);
As you can see, I'm using Encoding.Default here - I have tried all
available encodings that are available through Encoding, but none of them
returns the text as expected.
Is there another way to read the file? What can I change to make sure these
special characters are still read and processed?
Thanks in advance,
JayCee