Lines 254-272
Link Here
|
254 |
p_inlocale = aLocaleString.GetBuffer(); |
254 |
p_inlocale = aLocaleString.GetBuffer(); |
255 |
} |
255 |
} |
256 |
} |
256 |
} |
257 |
p_outlocale = p_inlocale; |
257 |
|
258 |
|
|
|
259 |
// FIXME |
258 |
// FIXME |
260 |
// setlocale() doesn't do much on Darwin 5 or 6. Here, since setlocale() is |
259 |
// setlocale() doesn't do much on Darwin 5 or 6. Here, since setlocale() is |
261 |
// #defined to _Xsetlocale() by our <X11/Xlocale.h>, it still doesn't work. |
260 |
// #defined to _Xsetlocale() by our <X11/Xlocale.h>, it still doesn't work. |
262 |
// Bypass it for MacOS X and Darwin. |
|
|
263 |
// NOTE: On MacOS X, we can't set the locale anyway because its set in |
261 |
// NOTE: On MacOS X, we can't set the locale anyway because its set in |
264 |
// the System Preferences application, under the International control panel. |
262 |
// the System Preferences application, under the International control panel. |
265 |
// Thus, the locale that we get from osl_getProcessLocale() is always valid as |
263 |
// Thus, the locale that we get from osl_getProcessLocale() is always valid as |
266 |
// its the locale that's already set. |
264 |
// its the locale that's already set. |
267 |
// NOTE 2: This setlocale() is still valid for Darwin though. |
265 |
// NOTE 2: This setlocale() is still valid for Darwin though. |
268 |
#else |
|
|
269 |
if ( (p_outlocale = setlocale(LC_ALL, p_inlocale)) == NULL ) |
266 |
if ( (p_outlocale = setlocale(LC_ALL, p_inlocale)) == NULL ) |
|
|
267 |
p_outlocale = p_inlocale; // Hack it so we return a good locale anyway |
268 |
|
269 |
#else |
270 |
if ( (p_outlocale = setlocale(LC_ALL, p_inlocale)) == NULL ) |
270 |
{ |
271 |
{ |
271 |
fprintf( stderr, |
272 |
fprintf( stderr, |
272 |
"I18N: Operating system doesn't support locale \"%s\"\n", |
273 |
"I18N: Operating system doesn't support locale \"%s\"\n", |