Locale files

When using flex and java in parallel the localization mechanism might be clear. One aspect which is not clear is the encoding of the properties files:

  • Flex locale files encoding: UTF-8
  • Java locale files encoding: ISO-8859-1

Convertor script:

..$ cat fixUTF.sh #!/bin/bash

TMP=iconv.tmp

if [ "!$2" == "!rev" ]; then	iconv -t ISO_8859-1 -f UTF-8 -o $TMP $1else	iconv -f ISO_8859-1 -t UTF-8 -o $TMP $1fimv $TMP $1

Leave a Reply

*