How to work with the special characters

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I read a text file line by line, and put the value into a arraylist. But
some special characters lost after asignment. Is there any solution to avoid
this?

Thanks in advance
 
Li Pang said:
I read a text file line by line, and put the value into a arraylist. But
some special characters lost after asignment. Is there any solution to
avoid
this?

If you are using 'System.IO.StreamReader' to read the text, you may want to
specify an appropriate encoding in the 'StreamReader''s constructor.
'System.Text.Encoding.Default' returns the system's default Windows-ANSI
codepage, which is used by many applications to encode text files.
 
Back
Top