Click here to Skip to main content
15,890,946 members
Home / Discussions / C#
   

C#

 
Questionwrong behaviour of Text Reader Pin
vishal moharikar30-May-09 1:03
vishal moharikar30-May-09 1:03 
Hi there.........
I am using text reader to read a text file. I have used the following code:

string str = "C:\\MKS.txt";
            TextReader textreader = new StreamReader(str);
            string inline = "";
            while ((inline = textreader.ReadLine()) != null)
            {
                if (rtEngData.Text == "")
                {
                    rtEngData.Text = inline;
                }
                else
                {
                    rtEngData.Text = rtEngData.Text + Environment.NewLine + inline;
                }
            } 




Here in my input file (in this code C:\MKS.Txt), a character ë is used.
(Go to the notepad and type ALT+0235, you will get the character.)
Now when I read this file, for this character it reads '�' .

Please tell me if there is any problem with my code block. or suggest me to get proper character.
Thanks....
Vishal.
AnswerRe: wrong behaviour of Text Reader Pin
Apocwhen30-May-09 1:49
Apocwhen30-May-09 1:49 
GeneralRe: wrong behaviour of Text Reader Pin
vishal moharikar31-May-09 18:16
vishal moharikar31-May-09 18:16 
AnswerRe: wrong behaviour of Text Reader Pin
Moreno Airoldi30-May-09 7:21
Moreno Airoldi30-May-09 7:21 
GeneralRe: wrong behaviour of Text Reader Pin
Luc Pattyn30-May-09 7:32
sitebuilderLuc Pattyn30-May-09 7:32 
AnswerRe: wrong behaviour of Text Reader Pin
Luc Pattyn30-May-09 7:38
sitebuilderLuc Pattyn30-May-09 7:38 
AnswerRe: wrong behaviour of Text Reader Pin
Joe Woodbury31-May-09 16:25
professionalJoe Woodbury31-May-09 16:25 
QuestionTabControl "vertical" AutoScroll Pin
netogg30-May-09 0:38
netogg30-May-09 0:38 
AnswerRe: TabControl "vertical" AutoScroll Pin
Satish Pai30-May-09 1:13
Satish Pai30-May-09 1:13 
GeneralRe: TabControl "vertical" AutoScroll Pin
netogg30-May-09 1:27
netogg30-May-09 1:27 
GeneralRe: TabControl "vertical" AutoScroll Pin
Satish Pai30-May-09 2:27
Satish Pai30-May-09 2:27 
GeneralRe: TabControl "vertical" AutoScroll Pin
Satish Pai30-May-09 2:50
Satish Pai30-May-09 2:50 
GeneralRe: TabControl "vertical" AutoScroll Pin
netogg30-May-09 13:58
netogg30-May-09 13:58 
Questiondownloading pdf on a desktop folder Pin
tauras8129-May-09 23:59
tauras8129-May-09 23:59 
AnswerRe: downloading pdf on a desktop folder Pin
Rajesh R Subramanian30-May-09 0:11
professionalRajesh R Subramanian30-May-09 0:11 
AnswerRe: downloading pdf on a desktop folder Pin
Henry Minute30-May-09 0:12
Henry Minute30-May-09 0:12 
QuestionHow to attach a new process with existing process Pin
Jacobb Michael29-May-09 23:50
Jacobb Michael29-May-09 23:50 
AnswerRe: How to attach a new process with existing process Pin
Rajesh R Subramanian30-May-09 0:13
professionalRajesh R Subramanian30-May-09 0:13 
AnswerRe: How to attach a new process with existing process Pin
Anubhava Dimri30-May-09 0:27
Anubhava Dimri30-May-09 0:27 
GeneralRe: How to attach a new process with existing process Pin
Jacobb Michael31-May-09 18:34
Jacobb Michael31-May-09 18:34 
AnswerRe: How to attach a new process with existing process Pin
SimpleData30-May-09 1:38
SimpleData30-May-09 1:38 
Questionto store datareader values in array Pin
priya1515s29-May-09 23:45
priya1515s29-May-09 23:45 
AnswerRe: to store datareader values in array Pin
Mycroft Holmes29-May-09 23:59
professionalMycroft Holmes29-May-09 23:59 
Questionhi Pin
hamed02129-May-09 23:44
hamed02129-May-09 23:44 
Questionhi Pin
hamed02129-May-09 23:44
hamed02129-May-09 23:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.