B
Boris Nienke
Hi,
i'm shocked!
Why?
I have a very simple textfile (created with the WindowsXP Editor).
Just entered "Test äöüß" (without the quotes) and saved it as "1.txt"
- You see the german umlauts in the Text?!?
Now, in the C# code i do this:
string sLine;
StreamReader sr = new StreamReader("1.txt");
sLine = sr.ReadToEnd();
sr.Close();
StreamWriter sw2 = new StreamWriter("2.txt");
sw2.Write(sLine);
sw2.Close();
Result? The Umlauts are NOT in "2.txt"!!!
I've debugged it and it's the StreamReader that is not reading the
German Umlauts! so after the
sLine = sr.ReadToEnd();
"sLine" just contains "Test "
This happens with umlauts in the middle of the Text too - so it has
nothing to do with leading or trailing umlauts.
Any idea what the problem is and how to let the reader read the umlauts
(and the writer to write them if this may be a problem too)???
urgent :-/
Boris
i'm shocked!
Why?
I have a very simple textfile (created with the WindowsXP Editor).
Just entered "Test äöüß" (without the quotes) and saved it as "1.txt"
- You see the german umlauts in the Text?!?
Now, in the C# code i do this:
string sLine;
StreamReader sr = new StreamReader("1.txt");
sLine = sr.ReadToEnd();
sr.Close();
StreamWriter sw2 = new StreamWriter("2.txt");
sw2.Write(sLine);
sw2.Close();
Result? The Umlauts are NOT in "2.txt"!!!
I've debugged it and it's the StreamReader that is not reading the
German Umlauts! so after the
sLine = sr.ReadToEnd();
"sLine" just contains "Test "
This happens with umlauts in the middle of the Text too - so it has
nothing to do with leading or trailing umlauts.
Any idea what the problem is and how to let the reader read the umlauts
(and the writer to write them if this may be a problem too)???
urgent :-/
Boris