C# FAQ: How to read files with accented characters
Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio
| CSharp-Online.NET:FAQs |
| edit |
[edit]
How to read files with accented characters?
Actually, this can be a large, complex topic. However, textual information—e.g. as stored in a file or sent over a network—is encoded; that is, the characters are converted into bytes according to some scheme. Therefore, bytes must be decoded to retrieve the information as characters again.
Normally, the encoding and decoding schemes must match or errors may result. And, this is the typical cause of decoding failures in which "extended" characters appear improperly decoded. (They may appear as empty boxes or as other incorrect characters.)
[edit]