>>>>> "Stuart" == Stuart Cook <sco...@gmail.com> writes:
Stuart> On Thu, Aug 20, 2009 at 4:28 PM, Colin Paul Stuart> Adams<co...@colina.demon.co.uk> wrote: >> But how do you get Latin-1 bytes from a Unicode string? This >> would need a transcoding process. Stuart> The first 256 code-points of Unicode coincide with Stuart> Latin-1. Therefore, if you truncate Unicode characters Stuart> down to 8 bits you'll effectively end up with Latin-1 text Stuart> (except that any code points above U+00FF will give Stuart> strange results). Stuart> If your terminal then interprets these bytes as UTF-8 (or Stuart> anything else, really), the result will be gibberish or Stuart> worse. Yes, but surely this will work both ways. The same bytes on input should come back on output, shouldn't they? -- Colin Adams Preston Lancashire _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe