<br><font size=2 face="sans-serif">A translation of </font>
<br>
<br><font size=2 face="sans-serif">http://www.ahinea.com/en/tech/perl-unicode-struggle.html</font>
<br>
<br><font size=2 face="sans-serif">from perl to haskell would be a very
useful piece of documentation, I think. </font>
<br>
<br><font size=2 face="sans-serif">That explanation really helped me get
to grips with the encoding stuff, in a perl context.</font>
<br>
<br><font size=2 face="sans-serif">thomas.</font>
<br>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Duncan Coutts &lt;duncan.coutts@worc.ox.ac.uk&gt;</b>
</font>
<br><font size=1 face="sans-serif">Sent by: haskell-cafe-bounces@haskell.org</font>
<p><font size=1 face="sans-serif">11/29/2007 07:44 AM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">Maurí­cio &lt;briqueabraque@yahoo.com&gt;</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">haskell-cafe@haskell.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [Haskell-cafe] Re: Strings and utf-8</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><tt><font size=2>On Wed, 2007-11-28 at 17:38 -0200, Maurí­cio wrote:<br>
&gt; &gt;&gt;(...) &nbsp;When it's phrased as &quot;truncates to 8<br>
&gt; &nbsp;&gt;&gt; bits&quot; it sounds so simple, surely all we need<br>
&gt; &nbsp;&gt;&gt; to do is not truncate to 8 bits right?<br>
&gt; &nbsp;&gt;&gt;<br>
&gt; &nbsp;&gt;&gt; The problem is, what encoding should it pick?<br>
&gt; &nbsp;&gt;&gt; UTF8, 16, 32, EBDIC? (...)<br>
&gt; &nbsp;&gt;&gt;<br>
&gt; &nbsp;&gt;&gt; One sensible suggestion many people have made<br>
&gt; &nbsp;&gt;&gt; is that H98 file IO should use the locale<br>
&gt; &nbsp;&gt;&gt; encoding and do Unicode/String &lt;-&gt; locale<br>
&gt; &nbsp;&gt;&gt; conversion. (...)<br>
&gt; <br>
&gt; I'm really afraid of solutions where the behavior<br>
&gt; of your program changes with an environment<br>
&gt; variable that not everybody has configured<br>
&gt; properly, or even know to exist.<br>
<br>
Be afraid of all your standard Unix utils in that case. They are all<br>
locale dependent, not just for encoding but also for sorting order and<br>
the language of messages.<br>
<br>
Using the locale is standard Unix behaviour (and these days the locale<br>
usually specifies UTF8 encoding). On OSX the default should be UTF8. On<br>
Windows it's a bit less clear, supposedly text files should use UTF16<br>
but nobody actually does that as far as I can see.<br>
<br>
Duncan<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
Haskell-Cafe@haskell.org<br>
http://www.haskell.org/mailman/listinfo/haskell-cafe<br>
</font></tt>
<br>
<br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">---</span><br>
<br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">This e-mail may contain confidential and/or privileged information. If you </span><br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">are not the intended recipient (or have received this e-mail in error) </span><br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">please notify the sender immediately and destroy this e-mail. Any </span><br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">unauthorized copying, disclosure or distribution of the material in this </span><br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">e-mail is strictly forbidden.</span><br>