Campbell Ritchie wrote:System#getProperty(String). If you can't get anything useful with "encoding" try System.getProperties and iterate through the Enumeration it returns.
You should be able to select the database's properties in MySQL but I can't remember how.
Thank you Campbell
I know I can select the character encoding of the database but if I want to distribute a program for others to run, I have no idea what the user's properties. So could you tell me some method to solve the problem that how to know the character encoding which the database is using...