Velocity template unable to get Chinese character correctly
800332Apr 25 2005 — edited Feb 8 2006Hi ter,
I was trying to set Chinese character to velocity template but when the user received the email, all the Chinese characters become ????? ! I use
public static String getBundleMessage(String key){
FacesContext context = FacesContext.getCurrentInstance();
ResourceBundle bundle = ResourceBundle.getBundle(resourceFile,context.getViewRoot().getLocale());
return bundle.getString(key);
}
to get the bundle message from registration_zh.properties file like
userid=\u7528\u6237\u540d
first_name=\u540d\u5b57
Please help, Thanks in advance !