encodings

Character encoding confusion!

Hi, Having some issues getting my head around the differences between UTF-8, UTF-16, ASCII and ANSI. After doing some research I have some idea but it would be really useful if someone could explain exactly the difference between them (including the byte representation of a typical character from each). I quess my question boils down t...

Question about Encodings: How can I output from HtmlAgilityPack to a StringWriter and keep the encoding?

I am reading html in with HtmlAgilityPack, editing it, then outputting it to a StreamWriter. The HtmlAgilityPack Encoding is Latin1, and the StreamWriter is UnicdeEncoding. I am losing some characters in the conversion, and I do not want to be. I don't seem to be able to change the Encoding of a StreamWriter. What is the best around ...

Python encoding ISO to UTF8

Hello everyone, I am trying to read my emails using a Python script (Python 2.5 and PyPy) Some of my results are not in ASCII and i get strings like this: =?ISO-8859-7?B?0OXm7/Dv8d/hIPP07+0gyuno4enx/u3h?=' Is there any way to decode it and convert to utf-8 so that i can process it? I tried .decode('ISO-8859-7') but i got the same s...