ASCII encoding and character sets...
ASCII is the first 128 bytes of the massive Unicode library. Thus, by using
ASCIIEncoding, you are throwing away half of the information on each
character. For me, living in the USA, that's usually not a problem. But,
to get Portuguese characters, you should be using the UnicodeEncoding class,
NOT the ASCIIEncoding class.
Now, how you get the Unicode in Portuguese, I hope someone else has the
answer to. But, with Unicode characters, it should be a straightforward
process.
Quote:
> I'm also having problems with special characters on an ASCII files.
> I create the StreamReader that reads the file this way:
> StreamReader stream = new StreamReader(fileName, new ASCIIEncoding());
> The number of characters read is correct but every time a letter has
> some kind of accentuation, it shows a question mark or some wierd
> sentence. Is it possible to set the ASCII character set on the
> StreamReader? Particularly for Portuguese characters...
> Unfortunately the file I'm trying to read is generated by another
> software package...
> Thanks in advance...