[Pythonmac-SIG] str.decode() behaves differently in 2.5 and 2.6
has
hengist.podd at virgin.net
Wed Oct 15 21:07:16 CEST 2008
On 12 Oct 2008, at 14:27, Just van Rossum wrote:
> It seems as if 2.5 uses native byte order by default, and 2.6 big
> endian (if there's no Byte Orde Mark). Maybe a bug, maybe a bug fix,
> I don't know :). In the meantime, just use 'utf-16be' or 'uft-16le'
> explicitly or make sure there's a BOM.
After further digging, it looks like it's a manifestation of a known
issue in 2.6's C API:
http://bugs.python.org/issue4060
Anyway, I've added a workaround to my code as suggested.
Thanks,
has
--
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net
More information about the Pythonmac-SIG
mailing list