locale is broken. setlocale does not return expected results.
Bug #51624 reported by
Jay R. Wren
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
glibc (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
calls to setlocale fail. This effects perl POSIX's setlocale as well.
Test case:
#include<stdio.h>
#include<locale.h>
int main(int argc,char** argv)
{
char* locale="en_US";
if (argc>1)
char* lres = setlocale(LC_ALL, locale);
if (lres != NULL)
}
EXPECTED RESULT:
setlocale(LC_ALL, "en_US") ;
should return a pointer to a char* saying "en_US".
Note: the original reporter indicated the bug was in package 'libc'; however, that package was not published in Ubuntu.
To post a comment you must log in.
looks like this effects many program, such as aspell
$ cat /etc/passwd|aspell -a
Error: No word lists can be found for the language "en_US".
$