[Pmwiki-users] annoying setlocale misbehaviour

Patrick R. Michaud pmichaud
Fri Apr 9 19:20:26 CDT 2004


On Fri, Apr 09, 2004 at 11:20:15AM +0200, Enrique Pardo wrote:
> 
> My ISP (pair.com) says that the "fr_FR" locale (set in PmWikiFr/XLPage) is
> not a valid php locale for their servers and I should add to it the
> character set I wish to use. This gives: "fr_FR.ISO8859-1"
> I have changed this in my PmWikiFr/XLPageLocal (I could have added it also
> to my config.php)

Yes, the locale information is unfortunately highly server dependent.
Many systems will also understand "french" as a locale name.

> While the month names are now in french, the character set changes the
> decimal separators generated from a php script from a period "." to a comma
> ",".

Oops, that's icky.  You may be able to fix this by adding:

   setlocale(LC_NUMERIC,'C');

to your config.php after the call to XLPage().

> So how to avoid it?
> I need the french locale (and month names in french).
> Pm, could you ROUND the generated font-size values?

They're already rounded, but I suppose I could round to the nearest unit
instead of the nearest tenth.  I'll probably do that in the next release.

Pm



More information about the pmwiki-users mailing list