I say axe it and say "UTF-8" is the fixed, default encoding. If you want something else, then do that explicitly.
Let me tell you why you would want to have an encoding which can be set: (1) sday I am on a Japanese Windows box, I have a string called 'address' and I do 'print address'. If I see utf8, I see garbage. If I see Shift-JIS, I see the correct Japanese address. At this point in time, utf8 is an interchange format but 99% of the world's data is in various native encodings. Analogous problems occur on input. (2) I'm using htmlgen, which 'prints' objects to standard output. My web site is supposed to be encoded in Shift-JIS (or EUC, or Big 5 for Taiwan, etc.) Yes, browsers CAN detect and display UTF8 but you just don't find UTF8 sites in the real world - and most users just don't know about the encoding menu, and will get pissed off if they have to reach for it. Ditto for streaming output in some protocol. Java solves this (and we could too by hacking stdout) using Writer classes which are created as wrappers around an output stream and can take an encoding, but you lose the flexibility to 'just print'. I think being able to change encoding would be useful. What I do not want is to auto-detect it from the operating system when Python boots - that would be a portability nightmare. Regards, Andy ===== Andy Robinson Robinson Analytics Ltd. ------------------ My opinions are the official policy of Robinson Analytics Ltd. They just vary from day to day. __________________________________________________ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com
participants (3)
-
Andy Robinson
-
Guido van Rossum
-
M.-A. Lemburg