[bugs] [illumos gate - Bug #1232] (Resolved) setlocale switch to C is broken

illumos bugs bugs at lists.illumos.org
Fri Jul 22 11:26:39 PDT 2011


Issue #1232 has been updated by Garrett D'Amore.

Status changed from New to Resolved

Fixed in:


changeset:   13409:a4e1558c0599
tag:         tip
user:        Jason King <jason.brian.king+illumoshg at gmail.com>
date:        Fri Jul 22 09:27:57 2011 -0700
description:
        1232 setlocale switch to C is broken
        Reviewed by: Gordon Ross <gwr at nexenta.com>
        Reviewed by: Garret D'Amore <garrett at nexenta.com>
        Reviewed by: Rich Lowe <richlowe at richlowe.net>
        Approved by: Eric Schrock <Eric.Schrock at delphix.com>

----------------------------------------
Bug #1232: setlocale switch to C is broken
https://www.illumos.org/issues/1232

Author: Julian Wiesener
Status: Resolved
Priority: Urgent
Assignee: Jason King
Category: locale - data and messages
Target version: 
Difficulty: Hard
Tags: locale


Result is https://www.illumos.org/issues/1203 since perl uses setlocale(LC_NUMERIC, "C"); to check the version number.

Testcase:
$ cat test.c
#include <locale.h>
#include <stdio.h>

int main(void)
{
        setlocale(LC_NUMERIC, "de_DE.UTF-8");
        printf("%f\n",2.5);
        setlocale(LC_NUMERIC, "C");
        printf("%f\n",2.5);
        setlocale(LC_NUMERIC, "en_US.UTF-8");
        printf("%f\n",2.5);
}
$ CC -o test test.c           
$ LC_NUMERIC=de_DE.UTF-8 ./test
2,500000
2,500000
2.500000


richlowe confirmed the bug: http://pastie.org/private/5e4e8xyzbh9jcjyremqlq


I set it to urgent, since it's a showstopper for OIs first Illumos based /dev Release



-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://www.illumos.org/my/account



More information about the bugs mailing list