Sunday, January 21, 2007

Managing text encoding in Java properties files

Something interesting when you write a software is to translate it. Java has this feature embedded. You simply have to write properties files and use a resource bundle to extract texts in your program. Consult ResourceBundle class javadoc for more information about how to proceed.

Something else very ineresting in about properties file encoding. Java specification supposes this sort of files to be written in ISO-8859-1. Oops! What about translating my software into japaneese? No problem, you cas use "unicode" codes in your files.

For exemple, to translate é, replace it by \u00E9 in your properties file. You can consult www.encoding.org for more informations aboiut encodings.

Thus, if you want to retreive characters codes, I propose you think excellent web page (in french) :
http://hapax.qc.ca/conversion.fr.html

Wednesday, January 03, 2007

Speed up Microsoft Windows XP explorer

Something very boring : Microsoft Windows XP explorer inspects zip files. This could really decrease performaces.

So ...

If you want to turn of WindowsXP showing Zip files as folders,
just run:

regsvr32 /u zipfldr.dll

Tuesday, January 02, 2007

An excellent article on functional programming

http://www.defmacro.org/ramblings/fp.html

Thanks Marco!

Calendar OGNL expression for Luntbuild

Wow, that's my first message with year that I started with Luntbuild. I looked for an ognl expression to preform build only in a specific time range.

So, after reading the documentation and surfing on forums, I found the class OGNLHelper on Luntbuild CVS repository. Bingo!

Here is a exemple of a expression that returns true in a specific time range :
(system.getHour() in {0,1,2,3,4,5,6})

In this example, build will be done betwenn midnight and 6:00am.