[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Locale vs. Number formatting

From: Ben Pfaff
Subject: Re: Locale vs. Number formatting
Date: Tue, 04 Dec 2012 23:18:25 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Ben Pfaff <address@hidden> writes:

> John Darrington <address@hidden> writes:
>> If I am right that this is a libc is the independent variable,
>> then we can expect a lot of users to start complaining after
>> their operating systems get upgraded.  Mindaugus correctly
>> points out that ignoring the LC_NUMERIC locale is not good
>> anyway (it means that certain aspects of the GUI don't get
>> displayed as users might want).  So I think we need to fix the
>> problem, not just the symptom.  That is to say, we should set
>> ALL locale categories, and deal with the consequences where, in
>> the past we have relied upon the C locale behaviour.
>> There are several approaches that I can think of:
>> 1. Use write a set of c-printf functions. Unfortunately, there
>> aren't any in gnulib.
> John and I talked about this in #pspp today.  We agreed to aim
> toward this approach.  John started in on it by committing some
> changes to use c_strtod() in place of strtod() where necessary.

It looks like it would be more or less trivial to implement
c_*printf() based on vasnprintf, using a source file like
lib/unistdio/u8-vasnprintf.c but adding:

    #define decimal_point_char_defined 1
    static char
    decimal_point_char (void)
        return '.';

anywhere before the #include "vasnprintf.c", to define a
c_vasnprintf(), then base the other c_*printf() off that in the
same way as e.g. lib/unistdio/u8-snprintf.c.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]