Miguel et al,
On looking through the Locale sensitive calls, of which there are over 10, I see
that JSpecView is only using 2 or 3 of them.
The one of interest was DecimalFormat so I changed all (~20) occurrences of
things like
new DecimalFormat("0.000000") to
new DecimalFormat("0.000000", new DecimalFormatSymbols(java.util.Locale.US ));
and removed the setDefault(US) so that system calls are now in the
language set by the OS and not all forced into English.
This seems to work at least when I set my PC to French and German
the program and applet runs and reads files OK.
Thanks
Robert
Hi,
I have now released JSpecView as Open Source
Excellent=21 Contratulations=21
and very quickly informed
that there are problems in Germany since the decimal point in the
JCAMP-DX data files is converted automatically to commas by the
Operating System.
Hmmm ... in this situation I suggest that you consider using different
routines to read the data files.
I assume that you are using some locale-specific routines that are
basically designed for reading localized input.
But your data is not like that ... it is in a standard format.
For the standalone application JAR I have used setDefault to override
the Locale setting and have enforced US.
Wiring everything to the US is clearly not a long-term solution.
The problem is with the applet
since if I change the default it will affect any other applets running
in the same workspace, including Jmol.
Yes, it probably affects the entire JVM.
Any suggestions as to how to sort out the applets independently (other
than find everywhere that Locale is implicated and using a setLocale).
I don't have a lot of experience with localization issues in Java, but I
am willing to investigate. We'll either find you a way to set the locale
just for the file reading methods OR we will find some other file reading=
primitives for you to use.
If you want, point me to some of your file-reading source code so that I
can see what kinds of routines you are using ... then I will investigate.=
Miguel
--
Prof. Robert J. Lancashire mailto:[EMAIL PROTECTED]
Department of Chemistry Tel (876) 512 3026
University of the West Indies, Kingston 7 Fax (876) 9771835
Mona Campus, JAMAICA. http://wwwchem.uwimona.edu.jm/chrl.html
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers