Bad charset sms messages in SMS-IN folder

Bad charset sms messages in SMS-IN folder SearchSearch
Author Message
Tommy H
Unregistered guest
Posted on Wednesday, August 18, 2004 - 01:33 pm:   

Hi.
I am using the 2 way sms. I have made a java program that is processing the messages in the SMS-IN folder . I have problems with the sms file messages that are created, they do not seem to have the correct character set. How can i change that? The characters æ ø å become æ ø Ã¥
Thanks
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 3295
Registered: 10-2002
Posted on Wednesday, August 18, 2004 - 03:58 pm:   

Hi Tommy,

Those characters that you reference are in UTF-8 format. So you would need to convert them from UTF-8 to the character set that you are using in your application.

Do note that if you are processing files in the SMS-IN directory directly, another issue that you may run into is that if a message is received in Unicode format, the SMS-IN file will contain a DCS=8, and a hex encoding of the Unicode message text. NowSMS doesn't convert the Unicode message into text format until it actually runs a 2-way command.

You might be better off configuring a 2-way command instead of scanning these files directly.

In addition to handling the Unicode messages better, there is also a configuration setting that can tell NowSMS to pass the received message text to a 2-way command using a character set other than UTF-8.

If you edit SMSGW.INI, and under the [SMSGW] header, add ReceiveSMSCharset=iso-8859-1 ... then NowSMS will pass the received message to your application with the text encoded in the standard Windows character set for Western Europe instead of UTF-8. (However, this setting will have no effect on the raw files that are written to the SMS-IN directory.)

-bn
Tommy H
Unregistered guest
Posted on Friday, August 20, 2004 - 01:44 pm:   

Thanks for your reply - I changed my app to be a webapp and used the 2 way command - works great - Thanks a lot :-)