Changing the process locale



Hi,

I ran into issues while dealing with locale sepcific strings in C
application and solution was to call setLocale(LC_ALL,"") at the start
of the application before performing any locale related operations.

I'm facing same issue with JVM, where we load C libraries though JNI
and C code fails to function proeprly if we do not call
setLocale(LC_ALL, "") when we load the library. I tried calling
Locale.setDefault() in Java main, but that didn't help, is there any
way to set the locale in Java which will make sure native JVM's locale
is set properly too?


Thanks,
-Kiran
.



Relevant Pages

  • Re: I18N Question re presenting time remaining
    ... > better term) I should be using for each locale and, especially, what Java ... time format is intended for wall clock time. ... Java gets the defaults for these DateFormat instances from some internal ...
    (comp.lang.java.programmer)
  • Re: build a browser in java
    ... java -Dfile.encoding=UTF-8 Browser02 ... Can't find bundle for base name ... hjResourceBundle, locale en_US ...
    (comp.lang.java.programmer)
  • Re: default constructor in Java versus C++
    ... In Java, a method's ... ResourceBundle getBundle(String baseName, Locale locale = ... ResourceBundle getBundle(String baseName) ...
    (comp.lang.cpp)
  • Re: C++, C# or Java.
    ... People often don't realize how much Java is actually doing behind the ... * Does your code detect the locale and if it's one where text should be ... Does your app support the Buddhist ... catch all exceptional situations and display a message to the ...
    (comp.lang.java.programmer)
  • Re: Changing Javas regional setting
    ... that single instance of the application. ... every Java application and the compiler defaults to using English rather ... than the system's default locale. ...
    (comp.lang.java)