[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems with 32-bit Unicode codepoints
From: |
Sadrul Habib Chowdhury |
Subject: |
Re: Problems with 32-bit Unicode codepoints |
Date: |
Fri, 5 Mar 2010 18:01:11 -0500 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
* Vladimir Marek had this to say on [22 May 2008, 12:29:51 +0200]:
> > > > It appears screen does not cope with 32-bit Unicode codepoints
> > > > (actually anything more than FFFF). I can view them in urxvt
> > > > without screen, but not in a screen session. My environment is
> > > > fully UTF-8.
> > >
> > > By quick inspection, it seems that function
> > >
> > > FromUtf8(c, utf8charp)
> > >
> > > returns
> > >
> > > if (c & 0xffff0000)
> > > c = UCS_REPL; /* sorry, only know 16bit Unicode */
> > >
> > > I'm just looking into the Unicode Standard. It might not be too
> > > difficult to add 3rd and 4th byte.
> > >
> > > I'll see what I can do.
>
> Hmm, I have been too optimistic. It seems that the UTF-8 decoding bit
> works correctly. But there is no internal storage for more than two
> bytes.
>
> Local gurus, please correct me if I'm wrong.
>
> mchar->image holds the lowermost 8bytes
> mchar->font holds one-but-lowermost 8bytes (unless it's 1, which means
> that character is not utf-8)
>
> My next naive theory is that if we make mchar->font 4 bytes wide (int),
> and we enhance MPutChar & LPutChar, we might get more UTF-8 support.
>
> Am I at least a bit close to the reality ?
It looks like you were pretty close!
I have made some other necessary fixes (memory allocation, comparison,
conversion to/from utf-8 etc.) to make this work. The work is in the
'unicode++' branch at:
http://git.savannah.gnu.org/cgit/screen.git/log/?h=unicode%2b%2b
There is an issue on savannah about it:
https://savannah.gnu.org/bugs/?27586
Please feel welcomed to test and review the changes made.
Cheers,
Sadrul
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Problems with 32-bit Unicode codepoints,
Sadrul Habib Chowdhury <=