On Fri, Apr 24, 2015 at 10:46 PM, Jim Mooney wrote:
> The docs don't mention that case is immaterial for aliases, when it usually
> matters in Python.
Section 7.2.3:
Notice that spelling alternatives that only differ in case or use a hyphen
instead of an underscore are also valid aliases
> See 7.2.3 (aliases) and 7.2.7 (utf_8_sig) in the codecs documentation.
>
> https://docs.python.org/3/library/codecs.html
>
The docs don't mention that case is immaterial for aliases, when it usually
matters in Python. The actual dictionary entries in aliases.py often differ
in case from the docs
On Fri, Apr 24, 2015 at 6:43 PM, Jim Mooney wrote:
> It looks like sig works for any dash, underline combination, and is ignored
> if there is no BOM:
See 7.2.3 (aliases) and 7.2.7 (utf_8_sig) in the codecs documentation.
https://docs.python.org/3/library/codecs.html
It looks like sig works for any dash, underline combination, and is ignored
if there is no BOM:
>>> farf = bytes('many moons ago I sat on a rock', encoding='utf8')
>>> farf
b'many moons ago I sat on a rock'
>>> str(farf, encoding="utf_8_sig")
'many moons ago I sat on a rock'
>>> str(farf, encoding