Why asci-only symbols?

Scott David Daniels scott.daniels at acm.org
Tue Oct 18 20:40:25 CEST 2005


Bengt Richter wrote:
> <on tracking the encodings of literal generated astrings>

The big problem you'll hit is figuring out how to use these strings.
Which string ops preserve the encoding?  Even the following is
problematic:

     #-*- coding: utf-8 -*-
     name = 'Martin Löwis'

    brokenpart = name[: 9]

Because brokenpart is not a correct utf-8 encoding of anything.
The problem is that there is no good way to propagate the
encoding without understanding the purpose of the operations
themselves.

--Scott David Daniels
scott.daniels at acm.org



More information about the Python-list mailing list