For PR libgcj/5031:
* java/lang/natSystem.cc (init_properties): Use LC_MESSAGES to choose default locale. From-SVN: r48664
This commit is contained in:
parent
1e7fcb11d0
commit
d9df09cce8
2 changed files with 10 additions and 1 deletions
|
@ -415,7 +415,12 @@ java::lang::System::init_properties (void)
|
|||
|
||||
// Set user locale properties based on setlocale()
|
||||
#ifdef HAVE_SETLOCALE
|
||||
char *locale = setlocale (LC_ALL, "");
|
||||
// We let the user choose the locale. However, since Java differs
|
||||
// from POSIX, we arbitrarily pick LC_MESSAGES as determining the
|
||||
// Java locale. We can't use LC_ALL because it might return a full
|
||||
// list of all the settings.
|
||||
setlocale (LC_ALL, "");
|
||||
char *locale = setlocale (LC_MESSAGES, "");
|
||||
if (locale && strlen (locale) >= 2)
|
||||
{
|
||||
char buf[3];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue