Re: PATCH, i18n - Use thousands separators in user-visible strings (Bug #41455)



On Wed, Jul 17, 2002 at 04:12:37AM -0400, Alexander Larsson wrote:
> On Mon, 15 Jul 2002, Gregory Merchan wrote:
> 
> > The attached patch should close bug #41455 for all SUSv2 (and later?)
> > systems. Afaict, non-compliant systems will see warnings but will not
> > otherwise be affected.
> > 
> > I think I caught all of the user-visible strings. Some are unchanged
> > because the number should never be greater than 999, such as a display
> > of seconds.
> > 
> > This is a string change and a ui change. Note the freeze on Friday.
> 
> Are you sure non-compliant system will still work? I can see a system not 
> supporting %'d ignoring that part instead of interpreting it as %d. Does 
> e.g. solaris support this?

I'm far from sure a non-compliant system will still work.

Here's what I've found.
Compiling a short test program

  #include <locale.h>
  #include <stdio.h>

  int
  main (int argc, char *argv[])
  {
    setlocale (LC_ALL, "");
    printf ("%'.2f\n", 9876543210.0123456789);
    printf ("%'d\n", 876543210);
    return 0;
  }

with just `cc test-program.c` works on:
 Debian Sid x86 glibc 2.2.5, and
 SunOS 5.8 at my university.

According to `man 5 standards` at the univeristy, Solaris 7 is SUSv2
compliant. Sun requires Solaris 8 or 9 for Sun GNOME.

If there are any supported systems that don't comply, I think the bug should
be pushed down to the glib layer. The documentation for the glib printf
functions refers to the "standard C" functions, but doesn't specify which
standard. We really need the requirements for GNOME made explicit.

What now?

Cheers,
Greg Merchan



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