From: Marcin 'Qrczak' Kowalczyk (email@example.com)
Date: Wed Dec 01 2004 - 17:35:38 CST
"Theodore H. Smith" <firstname.lastname@example.org> writes:
> Assuming you had no legacy code. And no "handy" libraries either,
> What would be the nicest UTF to use?
For internals of my language Kogut I've chosen a mixture of ISO-8859-1
and UTF-32. Normalized, i.e. a string with chracters which fit in
narrow characters is always stored in the narrow form.
I've chosen representations with fixed size code points because
nothing beats the simplicity of accessing characters by index, and the
most natural thing to index by is a code point.
Strings are immutable, so there is no need to upgrade or downgrade a
string in place, so having two representations doesn't hurt that much.
Since the majority of strings is ASCII, using UTF-32 for everything
would be wasteful.
Mutable and resizable character arrays use UTF-32 only.
-- __("< Marcin Kowalczyk \__/ email@example.com ^^ http://qrnik.knm.org.pl/~qrczak/
This archive was generated by hypermail 2.1.5 : Wed Dec 01 2004 - 17:36:45 CST