Converting UTF-8 to UCS-2
807603Oct 31 2007 — edited Nov 1 2007Hi All, I really need some help with character encoding. So here's my problem.
I have a properties file (message.properties) which is saved in UTF-8 format and contains Chinese Characters. I read this String using this code:
String value = new String(bundle.getString(key).getBytes(getValue(Constants."ISO-8859-1")), getValue("UTF-8"));
And it's working properly, I can retrieve the Chinese Character and insert it to database. The problem is now, this Chinese Character is going to be sent to a mobile phone via sms, which can only accept character in UCS-2.
I have been having trouble in converting this UTF-8 Chinese Character to UCS-2. Can somebody help me? Refer me to any links that might help??
I'm desperate :(
Thanks before...