[Tutor] sig no matter what
Jim Mooney
cybervigilante at gmail.com
Sat Apr 25 01:43:35 CEST 2015
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.
More information about the Tutor
mailing list