Relates :
|
|
Relates :
|
|
Relates :
|
With Mac 10.12 there are some locale issues with Simplified and traditional chinese. Locale.getDefault() returns zh-hans-us / zh-hant-us for the above languages The above causes some issues when we format a date instance. Date currentDate = new Date(); String date = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.getDefault()).format(currentDate); The above code throws an exception "ill-fomed language: zh-hans-us" for simplified chinese - Mac 10.12 and JDK9 b 155 These languages were earlier handled as zh_TW/zh_CN Also if run as a standalone java class, DateFormat.MEDIUM does not show any Chinese characters, DateFormat.LONG shows Chinese characters.
|