Neil Schemenauer wrote:

> DEFAULT_STR_CHARSET is for insane <wink> people who think
> that str instances should contain encoded character data.

I couldn't decide if I was one of those insane people as I wasn't sure
what it was that you were taking a dig at! Internally a Python program
may deal only in unicode strings, but these must still be serialised
to a bytestream (str) if they need to make their way in or out of the
program , yes? It wasn't "encoded" that you were referring to? Please
reassure me that you aren't a victim to the fallacy that str instances
could possibly contain *unencoded* character data! (As Joel Spolsky
explains, "there ain't no such thing as plain text". [1])

> Also, people who use unicode can set it to 'ascii' and ensure that
> http_response._decode_string() always returns unicode strings.

Will doing this always return a unicode string? If the input string
has bytes higher than 0x7F, won't decoding with the "ascii" codec
raise a UnicodeDecodeError?

[1] "The Absolute Minimum Every Software Developer Absolutely,
Positively Must Know About Unicode and Character Sets (No Excuses!)"
<http://www.joelonsoftware.com/articles/Unicode.html>


Hamish
_______________________________________________
Quixote-users mailing list
[email protected]
http://mail.mems-exchange.org/mailman/listinfo/quixote-users

Reply via email to