Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-136246

Break out numbering systems from QLocale

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.9
    • Core: Locales (i18n)
    • None
    • All
    • 34

    Description

      A locale may use several numbering systems - e.g. Chinese uses different number symbols for days than for counting sheep; there may also be locales that use Latin digits for some purposes but some other numbering system for others - and they are things separate from locales in the upstream CLDR data. This shall be a prerequisite of some calendar implementations.

      Doing this would also allow us to actually record the full range of digits, instead of only recording 0 and having to do kludges to work out the rest. We would also need to do this, as some numbering systems may not, historically, have ever used a 0 until one was added in relatively modern times, which may lead to several distinct numbering systems using the same zero.

      This would replace the zero-entry (an offset into one of our string data tables, plus a length) in the QLocale data tables with a number-system ID – which would surely in fact make them smaller (by approximately 680 words = 5440 bytes), while replacing the zeros in our "single-character" table with a new table for the digit-arrays, plus the new table for number systems.
      Since these last two would be fairly small (many of the locales we support share a small number of number systems) the change in data size shouldn't be a concern (and we might even make a saving).

      CLDR also has diverse numbering systems for which, instead of just listing the digits, it provides an algorithmic implementation; we should at least design with the possibility of eventually including support for these, albeit the initial separation from QLocale does not need this.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              cnn Qt Core & Network
              Eddy Edward Welbourne
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes