Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Convert UTF8 to MS949 MS874

allboryOct 27 2011 — edited Nov 5 2011
Hi all

I'm relatively new to java.

Now I'm writing JAVA(1.6) program to send SMS to local customer.

I should manipulate as 2 languages, MS949(Korean) and MS874(Thai).

There's one tomcat server with thread base scheduler program.

I've added this option to set up UTF in tomcat server.

JAVA_TOOL_OPTIONS -Dfile.encoding=UTF8

Also I see my eclipse default charset is UTF8.

According to SMS specification, use ThaiWindow874 and pass parameter with their address.

( As I knew MS874 and ThaiWindow874 is same)

But I can't read the message correctly.

Questions

1. How can I convert between UTF8 and MS874?

2. After fetch MSG from Oracle DB, I can read Thai correctly. But once I pass to SMS company URL, It's broken.

3. As a result of googling, I found some codes like below. But it's not work.

// fetch msg from Oracle DB(9i, set as UTF8)

byte[] utf8 = xxx.getBytes("UTF-8");
String vT5 = new String(utf8, "MS874");

// logic to pass SMS server with URL

Thanks in advance.

Dan
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 3 2011
Added on Oct 27 2011
2 comments
1,559 views