Advertisement

06.05.2008 at 07:34AM PDT, ID: 23460368
[x]
Attachment Details

Why does TextReader not read danish characters right?

Asked by Dein in .NET Framework 2.0, Microsoft Visual C#.Net

Tags: C#

Im reading a simple textfile with some danish text and characters, which shows rigth in notepad. When reading by TextReader the special danish characters are translated to some unreadable ones. What to do about that?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
TextReader tr;
tr = new StreamReader(filename);
            
string l = tr.ReadLine();
while (l != null)
{
   // Do something
   l = tr.ReadLine();
}
tr.Close();
[+][-]06.05.2008 at 08:19AM PDT, ID: 21720530

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 08:24AM PDT, ID: 21720589

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 08:35AM PDT, ID: 21720743

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET Framework 2.0, Microsoft Visual C#.Net
Tags: C#
Sign Up Now!
Solution Provided By: Bruce_1975
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.05.2008 at 10:02AM PDT, ID: 21721656

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 03:16PM PDT, ID: 21724554

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628