<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 23, 2015 at 11:55 AM, Andrew Collette <span dir="ltr"><<a href="mailto:andrew.collette@gmail.com" target="_blank">andrew.collette@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<span class=""><br>
> Using latin-1 is a pragmatic compromise that provides continuity to allow<br>
> scientists to run their existing code in Python 3 and have things just work.<br>
> It isn't perfect and it should not be the end of the story, but it would be<br>
> good.  This single issue is the *only* thing blocking me and my team from<br>
> using Python 3 in operations.<br>
<br>
</span>Since you mentioned HDF compatibility, I would just note that the two<br>
string formats HDF5 supports are ASCII and UTF-8, although presently<br>
no validation is performed by HDF5 as to the actual contents.  This<br>
shouldn't discourage anyone from going with Latin-1, but it would mean<br>
that h5py (and presumably PyTables) would have to choose from the<br>
following options:<br>
<br>
1. Convert to UTF-8, and risk truncation<br>
2. Store as ASCII and replace out-of-range characters with "?"<br>
3. Just store the Latin-1 text in a type labelled "ASCII", and live with it.<br>
4. Raise an exception if non-ASCII characters are present<br>
<br>
Realistically, h5py might go with (3) as the ASCII type in HDF5 is<br>
much abused already.<br></blockquote><div><br></div><div>I was working on the assumption that (3) would be the best choice, for the reason you gave and to minimize breakage in transitioning to Python 3.</div><div><br></div><div>- Tom</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
Andrew<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</div></div></blockquote></div><br></div></div>