A frequent problem when it comes to internationalisation is
proper handling of different charset. When you're using Java and Maven
it is relatively easy to set up source encoding to UTF-8, but the
frequent point of failure is in the SQL database.
If you use mySQL, and you have latin1 tables, but you should have
UTF-8 instead, use this little script to convert from latin1 to UTF-8
:
Generally speaking, don't hesitate to always put the
--default-character-set=utf8 on all the mySQL commands
you execute. Don't forget to add at the end of your jdbc connection
url the following parameters :
"useUnicode=true&characterEncoding=UTF-8" to ensure you
connect using UTF-8.
As an ancient Java developer, I’ve learned to use a set of
annotations to bring meta programming in my projects. Meta
programming can be ...…
Continue reading