The future of Sonnet
hausmann at kde.org
Tue Jan 2 20:06:19 GMT 2007
On Tuesday 02 January 2007 20:48, Jérôme Lodewyck wrote:
> Le mardi 2 janvier 2007 19:40, Thiago Macieira a écrit :
> > Simon Hausmann wrote:
> > >We actually consider exposing a bit more public unicode API in Qt 4.3.
> > > Some of it is already visible, like title casing and basic surrogate
> > > helpers.
> > And, as always, if you need something that is in the tables already but
> > not visible, ask. Maybe TT will consider exposing the API.
> For the KCharSelect Widget, it would be nice to have some information about
> the unicode character, e.g. what script and unicode block it belongs to.
> And conversely, which charecters belong to a given a script or a given
> block. This later property would enable to look for unicode characters by
> script or block, as it is possible with gucharmap, instead of by unicode
> page only. AFAIK, these properties are not exposed by Qt 4.2
We'll take this into consideration.
> Besides, is there a way to handle unicode characters that don't belong to
> the Basic Multilingual Plane (i.e with a number > 2^16) ?
Those are represented as surrogate pairs and currently Qt 4.3 has the
following helper functions in the public API:
bool QChar::isHighSurrogate() const;
bool QChar::isLowSurrogate() const;
static uint QChar::surrogateToUcs4(ushort high, ushort low);
static uint QChar::surrogateToUcs4(QChar high, QChar low);
static ushort QChar::highSurrogate(uint ucs4);
static ushort QChar::lowSurrogate(uint ucs4);
In addition there are various (static) overloaded functions in QChar that take
ucs4 encoded characters.
Apart from that rendering non-BMP characters if of course supposed to work.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the kde-core-devel