[Development] ICU and Windows

Koehne Kai Kai.Koehne at digia.com
Fri Mar 8 16:42:10 CET 2013

> -----Original Message-----
> From: development-bounces+kai.koehne=digia.com at qt-project.org
> [mailto:development-bounces+kai.koehne=digia.com at qt-project.org] On
> Behalf Of Thiago Macieira
> Sent: Thursday, March 07, 2013 8:34 PM
> To: development at qt-project.org
> Subject: Re: [Development] ICU and Windows
> On quinta-feira, 7 de março de 2013 16.16.05, Koehne Kai wrote:
> > I'm not 100% happy with the patch though because we have an inherent
> > timing
> > problem: ICU data might be accessed & cached before QCoreApplication
> > is created and has opened the .dat file. This happens in fact already
> > by default, when we're trying to get the configured data path from
> > QLibraryInfo, at which point the default codec is cached - I
> > explicitly fix this particular issue by resetting the cache
> > afterwards. Anyhow, it could very well be that we hit similar issues in the
> future.
> That's why the text codecs used to be built-in to QtCore depending on the
> configuration: we need the locale codec in order to translate paths from UTF-
> 16.
> You'll probably run into an infinite loop unless you completely avoid QString
> and all our FS classes.

Well, thing is that ICU also implements some encodings purely by algorithms, and therefore doesn't need the dat file:

" Since ICU always converts, to or from Unicode, the purely algorithmic converters are the ones for Unicode encodings (such as UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE, SCSU, BOCU-1 and UTF-7). Since Unicode is based on US-ASCII and ISO-8859-1 ("ISO Latin-1"), these encodings also use algorithmic converters for performance reasons."  [http://userguide.icu-project.org/conversion/data]. These can be created directly without any problems, but for some reason aren't returned if I access e.g. ucnv_countAvailable() ...

I'll look into this a bit more on Monday.



More information about the Development mailing list