guile-user
[Top][All Lists]
Advanced

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

Re: Formatted output with locale


From: Eli Zaretskii
Subject: Re: Formatted output with locale
Date: Thu, 17 Nov 2016 18:07:31 +0200

> From: address@hidden (Ludovic Courtès)
> Date: Thu, 17 Nov 2016 12:02:06 +0100
> 
> It seems to work as advertised for me:
> 
> --8<---------------cut here---------------start------------->8---
> scheme@(guile-user)> ,use(ice-9 i18n)
> scheme@(guile-user)> (number->locale-string 10000.01 2 (make-locale LC_ALL 
> "fr_FR.utf8"))
> $13 = "10 000,01"
> scheme@(guile-user)> (number->locale-string 10000.01 2 (make-locale LC_ALL 
> "de_DE.utf8"))
> $14 = "10.000,01"
> scheme@(guile-user)> ,use(ice-9 format)
> scheme@(guile-user)> (setlocale LC_ALL "de_DE.utf8")
> $15 = "de_DE.utf8"
> scheme@(guile-user)> (format #f "~12,2h" 10000.01)
> $16 = "   10.000,01"
> --8<---------------cut here---------------end--------------->8---
> 
> That’s on GNU/Linux (glibc 2.24).

It works for me as well, on MS-Windows (although I need to use a
non-UTF-8 codeset in the locales).



reply via email to

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