[Development] QLocale work

lars.knoll at nokia.com lars.knoll at nokia.com
Mon Jan 23 23:48:12 CET 2012


On 1/23/12 10:42 PM, "ext Thiago Macieira" <thiago.macieira at intel.com>
wrote:

>On Monday, 23 de January de 2012 21.21.13, John Layt wrote:
>> On Wednesday 18 Jan 2012 00:47:31 you wrote:
>> > * If we can port the QLocalePrivate number routines to call ICU
>>instead of
>> > their current implementations, the rest of Qt will "just work",
>> 
>> Small wrinkle just turned up here, ICU only does parse/format for base
>>10
>> numbers and not for binary, octal or hex, which is technically correct
>>as
>> they are not localised formats, but it's a pain none-the-less.
>> 
>> Because QLocale, QByteArray, QString and QTextStream offers the base
>>option
>> in the public API, we will need to keep the existing code to do it.  If
>>the
>> requested parse/format is for base 10 then we'll pass it to ICU,
>>otherwise
>> we'll use the current code.  We will just need to document the behaviour
>> that other bases will always use the standard digits and not the local
>>one.
>
>You mean QLocale and QTextStream.

I am very tempted to simply break this. localized binary numbers simply
don't make any sense.

Cheers,
Lars

>
>QByteArray and QString do not need ICU since they are locale-independent.
>Parse LC_ALL=C in them only. It's also a good idea to keep that code for
>when 
>QT_NO_LOCALE is in effect.
>
>-- 
>Thiago Macieira - thiago.macieira (AT) intel.com
>  Software Architect - Intel Open Source Technology Center
>     Intel Sweden AB - Registration Number: 556189-6027
>     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
>_______________________________________________
>Development mailing list
>Development at qt-project.org
>http://lists.qt-project.org/mailman/listinfo/development




More information about the Development mailing list