Neither of these relates to some specific Unicode version. QChar is a 16-bit Unicode character part. QString is UCS-2-encoded. Read about UTF-16 for more info. Also !qdoc: QChar::highSurrogate(), QChar::lowSurrogate()
Regards, Konstantin 2013/9/9 Kurt Pattyn <pattyn.k...@gmail.com> > Hi Konstantin, > > that is exactly what I did. > From the Qt5 documentation: > > The QChar class provides a 16-bit Unicode character. > > In Qt, Unicode characters are 16-bit entities without any markup or > structure. This class represents such an entity. It is lightweight, so it > can be used everywhere. Most compilers treat it like a unsigned short. > > > There is no mention of UTF-16. Furthermore, I would expect to method > unicode(), to return the UCS-4 representation: > > ushort<http://qt-project.org/doc/qt-5.0/qtcore/qtglobal.html#ushort-typedef> > QChar::unicode() const > > Returns the numeric Unicode value of the > QChar<http://qt-project.org/doc/qt-5.0/qtcore/qchar.html> > . > > > But, it doesn't return the unicode v6.2 value, as that can be 32-bit; I > know. It gives me the impression that QChar is based on an old Unicode > standard. > > Furthermore (again from the documentation): > > Qt 5.0 uses and fully supports version 6.2 of the Unicode standard. > > > At least, I think this is confusing. > > So, either the documentation of QChar should at least indicate that it is > encoded in UTF-16, which I doubt (because then QChar should have place for > 2 16-bit values), or QChar should be adapted to conform to the statement > that Qt5.0 is Unicode 6.2 compliant, or it should be indicated that QChar > conforms to an older standard. > > So, I was just wondering how QChar fits within the Unicode 6.2 standard? > Reading the docs doesn't clarify much. > > Kurt > > On 08 Sep 2013, at 22:43, Konstantin Ritt <ritt...@gmail.com> wrote: > > > Plz read the docs. > > Regards, > Konstantin > > > 2013/9/8 Kurt Pattyn <pattyn.k...@gmail.com> > >> On 08 Sep 2013, at 20:43, Thiago Macieira <thiago.macie...@intel.com> >> wrote: >> >> > On domingo, 8 de setembro de 2013 20:36:39, Kurt Pattyn wrote: >> > >> > It's limited by the size of QChar. It cannot contain 0x10000. >> > >> Isn't it supposed that a QChar contains a Unicode character (which is >> 32-bit in size)? >> >> Regards, >> Kurt >> _______________________________________________ >> Development mailing list >> Development@qt-project.org >> http://lists.qt-project.org/mailman/listinfo/development >> > >
_______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development