Wednesday, July 08, 2009

Unicode in Java

Today I found out the jvm system properties file.encoding needs to be set as UTF-8 in non-English windows to work properly with an utf-8 configured MySQL (that's with DEFAULT CHARSET=utf8 in CREATE TABLE).

-Dfile.encoding=UTF-8


In traditional chinese windows, the default code page is ms950, while it is windows-1252 for my local English windows setup.

No comments: