brianmario/charlock_holmes — pull request #69 by brianmario (2014-06-07 00:34:15+00:00)
Title: Add some windows-* aliases to supported encodings list for detection

Why?

windows-1252 is an alias for ISO-8859-1 but not returned as an entry in the supported encodings list for the detection API. This means the lookup table we build for Ruby-compatible encoding names won't include it and lookups for that encoding name will fail.

From the ICU documentation:

Note: Multiple different charset encodings in a same family may use a single shared name in this implementation. For example, this method returns an array including "ISO-8859-1" (ISO Latin 1), but not including "windows-1252" (Windows Latin 1). However, actual detection result could be "windows-1252" when the input data matches Latin 1 code points with any points only available in "windows-1252".