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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top