Project

General

Profile

Actions

Bug #1232

closed

setlocale switch to C is broken

Added by Julian Wiesener over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
locale - data and messages
Start date:
2011-07-20
Due date:
% Done:

90%

Estimated time:
Difficulty:
Hard
Tags:
locale
Gerrit CR:

Description

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


Files

locale.diff (2.46 KB) locale.diff Jason King, 2011-07-20 09:09 PM
locale.patch (2.34 KB) locale.patch Corrected patch Jason King, 2011-07-21 02:59 AM
test.c (2.12 KB) test.c Test case Jason King, 2011-07-21 02:59 AM

Related issues

Blocks OpenIndiana Distribution - Bug #1203: /usr/sbin/psrinfo broken in oi151ResolvedJulian Wiesener2011-07-12

Actions
Actions

Also available in: Atom PDF