[M3devel] build problems with libunicode

Elmar Stellnberger estellnb at elstel.org
Mon Jun 2 08:40:04 CEST 2014


The only target system that does not support such a conversion on its own would be
Xorg/Trestle. You would need to convert to utf-16 and then byte swap for little endian
machines as the XChar2b is defined as a struct with the hi byte first.


Am 02.06.2014 um 08:29 schrieb Elmar Stellnberger:

>> 
>> 
>> But do gtk and qt actually treat all characters as 16-bit fixed-size code points, or do they
>> actually use UTF16, with the 16-bit value being a code unit, not a code point?  In the
>> latter case, using UniWr and UniRd to do the encoding/decoding would be a much cleaner
>> option.
>> 
> 
> Qt and Gtk should be able to handle true UTF-16 including surrogate pairs so that
> finally making an UniRd and UniWr from such a 16bit type would be the way to go.
> As far as I have researched Gtk has some UCS-4 conversion functions by its own. 
> Qt has a QString::fromUcs4( const unit* unicode, int size=-1) function as well, so 
> that we could even do the conversion in some client library. There is also a 
> QVector<unit> QString::toUcs4() const which you can apply a .data() upon to get
> an in memory array of UCS-4 characters.
> 
> Elmar Stellnberger
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20140602/f44c8a0e/attachment-0002.html>


More information about the M3devel mailing list