[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Unicode and UTF-8 the Lua way, mid-discussion (was Re: What do you miss most in Lua)
- From: Tony Finch <dot@...>
- Date: Wed, 8 Feb 2012 16:40:53 +0000
Jay Carlson <email@example.com> wrote:
> Oh dear, who put that that SJIS fie in that directory?
Veering further off topic, Joey Hess recently blogged about dealing with
mostly-but-not-guaranteed UTF-8 filenames in Haskell:
The official standard approach requires applications to either refuse to
handle malformed unicode data or to corrupt it. It seems to me that a
better approach is to treat input and output of unicode data as a
low-level operation that should guarantee that the data can be
round-tripped without corruption. The decision about how to handle
malformed data should occur at a higher level. This approach mirrors what
we have done with ASCII data in the past.
f.anthony.n.finch <firstname.lastname@example.org> http://dotat.at/
Forties, Cromarty, Forth: South 5 to 7, occasionally gale 8 except in Forth.
Moderate or rough. Occasional rain. Moderate or good.