text
text copied to clipboard
add CP1252 Encoding
i.e. add these to Data.Text.Encoding:
-
decodeCP1252With -
encodeCP1252With
Windows-1252 or CP-1252 (code page – 1252) is a single-byte character encoding of the Latin alphabet, used by default in the legacy components of Microsoft Windows in English and some other Western languages (other languages use different default encodings). It is probably the most-used 8-bit character encoding in the world.
from https://en.wikipedia.org/wiki/Windows-1252.
this encoding comes up under Windows development. For example, Dragon Naturally Speaking, a speech recognition engine, returns dictations in the "native, legacy" CP-1252 format.
also, this encoding is supported by the python standard library:
>>> u'café'.encode('cp1252')
'caf\xe9'