bugGNU libunistring - Bugs: bug #49905, add locale dependent...


You are not allowed to post comments on this tracker with your current authentication level.

bug #49905: add locale dependent unicode-string to number conversion functions

Submitter:  Bruno Haible <haible>
Submitted:  Wed 21 Dec 2016 06:05:49 PM UTC
Category:  unistdio Severity:  1 - Wish
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Tue 14 Mar 2017 06:07:19 PM UTC, comment #2: 
Bruno Haible <haible>
Group administrator
Tue 14 Mar 2017 06:06:43 PM UTC, comment #1: 

Section 4.6 of the Unicode standard also mentions ideographs with numeric values.

Bruno Haible <haible>
Group administrator
Wed 21 Dec 2016 06:05:49 PM UTC, original submission:  

Originally posted in https://savannah.gnu.org/support/?106998 :

Mike Gran:


It would be neat to have unicode-string->integer and unicode-string->double conversion functions according to the rules of the locale.

Bruno Haible:

Yes, this would be useful. You can implement such a function
yourself, roughly like this:
1) Decide what kinds of decimal point character, decimal
grouping character, exponent marker, sign character,
and digit scripts you want to support in that conversion.
2) Verify that all digits in the input are from the same
3) Convert the digits to their numerical value using the
uc_digit_value function.
4) Build up a 'char *' string with the corresponding ASCII
digits and sign, and without grouping characters.
5) Pass that string to strtol or strtod.

Such a function will not be in libunistring in the near term,
because the decisions in 1) are not clear to me yet, how to
do them right.

Bruno Haible <haible>
Group administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by haible (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code