Text reader removing special characters

  • Thread starter Thread starter David Lambert
  • Start date Start date
D

David Lambert

Hi, I have a text reader that is parsing a file, I have a
number of lines with accents eg. "Herr Dietman Löflers
(CEO)" my text reader returns: "Herr Dietman Lflers
(CEO)", it drops all the characters with the accents. Is
there a way to keep them in?

Thanks in advance for any help.

dave
 
David,

Make sure you use the encoding that matches the text encoding in the
file you're reading. The StreamReader class - if that's what you're
using - has a number of constructors that lets you specify the
appropriate Encoding.



Mattias
 
This great overview from Joel on Software may be of some help.

http://www.joelonsoftware.com/articles/Unicode.html

Tom Clement
Apptero, Inc.

Hi, I have a text reader that is parsing a file, I have a
number of lines with accents eg. "Herr Dietman Löflers
(CEO)" my text reader returns: "Herr Dietman Lflers
(CEO)", it drops all the characters with the accents. Is
there a way to keep them in?

Thanks in advance for any help.

dave
 
Back
Top