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

Submitted by:  Bruno Haible <haible>
Submitted on:  Wed 21 Dec 2016 06:05:49 PM UTC  
 
Category: unistdioSeverity: 1 - Wish
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Tue 14 Mar 2017 06:07:19 PM UTC, comment #2:

Also requested at https://lists.gnu.org/archive/html/bug-libunistring/2017-03/msg00000.html

Bruno Haible <haible>
Project 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>
Project Administrator
Wed 21 Dec 2016 06:05:49 PM UTC, original submission:

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

Mike Gran:

u32_strtod_l

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
script.
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>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup1