John Weiss <[EMAIL PROTECTED]> writes:
| 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.)
xxx LyXParagraph::getChar(int pos)
should then return what? char? wchar_t? char[2]? char[4]?
a multibyte-char object?
narrow or wide char is imho the only option internally.
--
Lgb