This discussion is archived
3 Replies Latest reply: Aug 6, 2010 7:32 AM by 843810 RSS

CharsetProvider GSM SMPP

843810 Newbie
Currently Being Moderated
Hi,

I have an application that sends sms from the web. So far the message has been sent in ISO8859-1 encoding. All chars but the euro-char works fine. Now I want to change the encoding to GSM7BIT. Here is when i encounter problems.

My server is Tomcat6 on Ubuntu os. I am using Logicas SMPP-package to send the sms. When I call the method: "SubmitSM.setShortMessage(message,Data.ENC_GSM7BIT);". I get an error: "java.io.UnsupportedEncodingException: X-Gsm7Bit".

The file java.nio.charset.spi.CharsetProvider is in the directory ROOT/META-INF/services/ .
In the file, on line of text is written: org.smpp.charset.Gsm7BitCharsetProvider. This is the path to the corresponding class-file. Ie. the class can be found in the directory: ROOT/WEB-INF/classes/org/smpp/charset/
(I also tried to put the file in the directory: ROOT/WEB-INF/classes/META-INF/services/)

The API for CharsetProvider says that the file (java.nio.charset.spi.CharsetProvider) must be encoded in UTF8. Maybe this is why it doesn't work? Is there any way you can decode a file from ASCII to UTF8?

Today i downloaded the JCharset - Java Charset package and put the jcharset.jar file in the directory ROOT/WEB-INF/classes (where all my other jar-files are). I also added the path to my CLASSPATH environment variable, but I still get the same error.

Is there anyone who know a solution to this problem(s)?

Best Regards
Lisa
  • 1. Re: CharsetProvider GSM SMPP
    843810 Newbie
    Currently Being Moderated
    Strangely this code works fine when I execute the code in DOS. The problem arise when I try to run it under Tomcat 6. It makes no difference if I run it locally in Windows XP or on the Ubuntu server.

    Has anybody had the same problem?

    Best Regards
    Lisa
  • 2. Re: CharsetProvider GSM SMPP
    843810 Newbie
    Currently Being Moderated
    Hi Lisa-Maria,

    I'm working with SMPP too and I have the same problem. I've been searching through the Internet, and the only post I've found is this one. Please, could you tell me if you found out the solution??

    Does anybody else know how to solve this?

    Thank you so much in advance.

    Best regards,
    Cris.
  • 3. Re: CharsetProvider GSM SMPP
    843810 Newbie
    Currently Being Moderated
    Hello everyone.

    Have you found any solution for this problem?

    I'm having the exact same problem using Tomcat 6 and SMPP with Ubuntu.

    I was wondering if I use Tomcat 7 could work...

    Thanks in advance.