On Fri, Apr 20, 2001 at 03:50:37PM +0300, Dekel Tsur wrote:
> On Fri, Apr 20, 2001 at 09:21:53AM +0300, Martin Vermeer wrote:
> > > trickier. You'd basically have to convert from utf-8 to full Unicode
> > > on-the-fly, as you displayed.
> >
> > How expensive is this really? The correspondence between the two looks
> > like real simple math, like a ten-liner, where US-ASCII would branch off
> > at the first, and latin1 at the second branch. Would it take a
> > non-negligible time compared to physically rendering the character in X?
>
> Speed is not the only issue. Storing the text internally as UTF8 will
> probably make the code more complicated.
Actually, you'd just store it internally as a sequence of "char".
Nothing complicated there. The utf-8 enconding standard specifies how
you sequence the multibyte characters as well as what constitutes a
1-byte vs a multibyte char. (I'd have to check the Unicode book for
the details.)
--
John Weiss
"Not through coercion. Not by force. But by compassion. By
affection. And, a small fish." -His Holiness, the 14th Dalai Lama