On 9/11/06, <b class="gmail_sendername">Marcin 'Qrczak' Kowalczyk</b> <<a href="mailto:qrczak@knm.org.pl">qrczak@knm.org.pl</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
"Paul Prescod" <<a href="mailto:paul@prescod.net">paul@prescod.net</a>> writes:<br><br>> Guido's goal was that quick and dirty text processing should "just<br>> work" for newbies and encoding-disintererested expert programmers.
<br><br>What does 'guess' mean for creating files?</blockquote><div><br>I wasn't sure about this one. But on Windows and Mac it seems safe to generate UTF-8-with-BOM. Textedit, VIM and notepad all auto-detect the UTF-8 BOM and do the right thing.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">2. Files are created in UTF-8.<br><br> Then files encoded with the locale encoding will be silently
<br> recoded to UTF-8, causing trouble for further work with the file<br> (it can't be even typed to the terminal).</blockquote><div><br>It can on the teriminal on the mac. And on the increasing number of UTF-8 defaulted Linux distributions. Perhaps it should by default use the Unix locale for output, but only on Unix and not on mac/Windows.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I've implemented a hack which allows simple programs to "just work" in
<br>case of UTF-8. It's a modified encoder/decoder which escapes malformed<br>UTF-8 sequences with '\0' bytes, and thus allows arbitrary byte<br>sequences to round-trip UTF-8 decoding and encoding. It's not used by<br>default and it's never used when "UTF-8" is specified explicitly,
<br>because it's not the true UTF-8, but I have an environment variable<br>which says "if the locale is UTF-8, use the modified UTF-8 as the<br>default encoding".</blockquote><div><br>That's an interesting idea. I'm not sure if you are proposing it as being applicable to this PEP or not...
<br><br> Paul Prescod<br><br></div><br></div>