views:

35

answers:

1

I need to support decoding ISO-8859-1 in my e-mail client. Specifically sometimes messages contain attaches that have filenames starting with "?iso-8859-1?".

Wikipedia says ISO-8859-1 is pretty much the same as Windows 1252. I already have good tested code for decoding Win1252. Can I just use it directly and expect no problems?

+2  A: 

Yes. The Windows-1252 codepage coincides with ISO-8859-1 in the code ranges 0x00 to 0x7F and 0xA0 to 0xFF, but not for the range 0x80 to 0x9F. Since ISO-8859-1 has no characters defined for the range 0x80 to 0x9F, this is not a problem. ISO-8859-1 is thus a subset of Windows-1252.

Sjoerd