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="utf-8-sig")
'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="utf-8_sig")
'many moons ago I sat on a rock'
--
Jim
Then: "Get rich flipping houses, with No Money Down!" Now: "Get rich making
the next great app, with No Programming!" There's always a sucker for
get-rich-quick schemes.
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor