language and style issues after reinstall java and servoy

Recently i’ve been forced to reinstall java and servoy on my development machine. And now i’m having a couple of issues:

  1. Servoy does not recognize my region settings anymore, both in developer and when I run a smartclient from my test server.
  2. Smart client shows all my text in bold

I’ve installed the following versions:
Windows 7 64bit
java 7.25 - 32bit (was 6.24, 64bit - very old I know)
Servoy 6.1.6 (same version as before my environment crashed)

region settings are just java settings, that are taken from the system. Servoy does only read them by default.
Only if you set them hard in the (client or server) preferences or through scripting we do set the locale and timezone defaults.

bold text is a known problem of java 7. there are numerous bug reports for that already at oracle/sun including one of my own where i exactly say where the problem is.

The system settings have not changed. I do have an english windows version, but region settings are set to dutch:
Formats: Dutch
Location: Netherlands
Keyboard: Dutch(Netherlands) - US
Language non-unicode programs: Dutch

I also notice the problem with the language in the developer when I wnat to edit i18n values: it is default set to english.

that something java7 does it seems…

if i have a simple application that just prints out 2 defaults:

System.err.println(Locale.getDefault());
System.err.println(TimeZone.getDefault());

then in java6 i get:

nl_NL
“Europe/Berlin”

and in java7:

en_GB
“Europe/Berlin”

i see in eclipse/servoy developer: (Help → About → Installation Details-> Configuration)

osgi.nl=en_GB
user.country=GB
user.country.format=NL
user.language=en
user.language.format=nl
user.timezone=Europe/Berlin

so it seems that the locale now reflects the languages of your operation system, but the formats are set to NL …

http://bugs.sun.com/bugdatabase/view_bu … id=7073906

it seems that in java7 we need to use the new stuff Category stuff

http://stackoverflow.com/questions/7107 … ult-locale

But that is a bit of a problem because we don’t have a compile dependency against java7 (we compile against java6)

I’ve managed to fix this be setting java runtime variables to the correct language.
Open Java Control Panel → Java tab → View.
Add the Java Runtime Environment Settings i’ve added the following runtime parameters:
-Duser.language=nl -Duser.country=NL
After restarting my client, it uses the correct language and the text is no longer in the BOLD format.

For the time being (not compiling against Java 7) Servoy could use this:

Note that you can revert to the old behavior by setting the sun.locale.formatasdefault system property to true.

make a case for this, maybe we can have some fallbacks, problem is that its easy to fix i guess from our methods.
But much harder if we really need to fix it in the core for the general i18n messages (if thats needed)