<br><br><div><span class="gmail_quote">On 9/3/06, <b class="gmail_sendername">Jim Jewett</b> <<a href="mailto:firstname.lastname@example.org">email@example.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 9/1/06, Nick Coghlan <<a href="mailto:firstname.lastname@example.org">email@example.com</a>> wrote:<br>> Fredrik Lundh wrote:<br>> > today's Python supports "locale aware" 8-bit strings ...<br>> > to what extent should this be supported by Python 3000 ?
<br><br>> Since all strings will be Unicode by then:<br><br>> >>> u"едц".isalpha()<br>> True<br><br>Two followup questions, then ...<br><br>(1) To what extent should python support files (including stdin,
<br>stdout) in local (non-unicode) encodings? (not at all, per-file,<br>settable global default?)</blockquote><div><br>I presume that Python's support of these will not change from today's. I don't think that locale changes file decoding today, nor should it. After all, files are emailed from place to place all the time.
<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) To what extent will strings have an opaque (or at least<br>on-demand) backing store, so that decoding/encoding could be delayed?
<br>(For example, Swedish text could be stored in single-byte characters,<br>and only converted to standard unicode on the rare occasions when it<br>met strings in an incompatible encoding.)</blockquote><div><br>I don't see this as particularly related to the locale issue either. It is being discussed in other threads under the name "Polymorphic strings." Fredrik Lundh said:
<br><br>"I think just delaying decoding would take us most of the way. the big<br>advantage of storage polymorphism is that you can avoid decoding and<br>encoding (and having to pay for the cycles and bytes needed for that) if
<br>you don't do have to."<br><br>I believe he is working on a prototype.<br><br> Paul Prescod<br><br></div></div>