[Python-Dev] Re: adding a bytes sequence type to Python
Greg Ewing
greg at cosc.canterbury.ac.nz
Tue Aug 17 03:13:32 CEST 2004
> However, byte strings used in source code are not "safe" if they
> are encoded in ISO-8859-1 under recoding: If the source code is
> converted to UTF-8 (including the encoding declaration), then
> the length of the strings changes, as do the byte values inside
> the string.
This suggests that byte string literals should be
restricted to ASCII characters and \x escapes.
Would that be safe enough?
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. |
greg at cosc.canterbury.ac.nz +--------------------------------------+
More information about the Python-Dev
mailing list