Fred L. Drake, Jr. <fdrake@acm.org> wrote: > M.-A. Lemburg writes: > > Such a buffer is needed to implement "s" and "s#" argument > > parsing. It's a simple requirement to support those two > > parsing markers -- there's not much to argue about, really... > > unless, of course, you want to give up Unicode object support > > for all APIs using these parsers. > > Perhaps I missed the agreement that these should always receive > UTF-8 from Unicode strings. from unicode import * def getname(): # hidden in some database engine, or so... return unicode("Linköping", "iso-8859-1") ... name = getname() # emulate automatic conversion to utf-8 name = str(name) # print it in uppercase, in the usual way import string print string.upper(name) ## LINKöPING I don't know, but I think that I think that it perhaps should raise an exception instead... </F>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4