|
Last change
on this file was 2036, checked in by bird, 20 years ago |
|
Initial revision
|
-
Property cvs2svn:cvs-rev
set to
1.1
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
-
Property svn:keywords
set to
Author Date Id Revision
|
|
File size:
578 bytes
|
| Line | |
|---|
| 1 | /* Test case by Jakub Jelinek <jakub@redhat.com>. */
|
|---|
| 2 | #include <locale.h>
|
|---|
| 3 | #include <stdio.h>
|
|---|
| 4 | #include <string.h>
|
|---|
| 5 |
|
|---|
| 6 | int
|
|---|
| 7 | main (void)
|
|---|
| 8 | {
|
|---|
| 9 | char q[30];
|
|---|
| 10 | char *s;
|
|---|
| 11 |
|
|---|
| 12 | setlocale (LC_ALL, "");
|
|---|
| 13 | printf ("after setlocale (LC_ALL, \"\"): %s\n", setlocale(LC_NUMERIC, NULL));
|
|---|
| 14 |
|
|---|
| 15 | strcpy (q, "de_DE.UTF-8");
|
|---|
| 16 | setlocale (LC_NUMERIC, q);
|
|---|
| 17 | printf ("after setlocale (LC_NUMERIC, \"%s\"): %s\n",
|
|---|
| 18 | q, setlocale(LC_NUMERIC, NULL));
|
|---|
| 19 |
|
|---|
| 20 | strcpy (q, "de_DE.ISO-8859-1");
|
|---|
| 21 | s = setlocale (LC_NUMERIC, NULL);
|
|---|
| 22 | printf ("after overwriting string: %s\n", s);
|
|---|
| 23 |
|
|---|
| 24 | return strcmp (s, "de_DE.UTF-8") != 0;
|
|---|
| 25 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.