participate


Internationalization (I18N) - CharsetProvider GSM SMPP
This question is not answered.

<<   Back to Forum  |   Give us Feedback
10 Duke Stars available
This topic has 1 reply on 1 page.
Lisa-Maria
Posts:2
Registered: 10/29/09
CharsetProvider GSM SMPP   
Oct 29, 2009 2:04 PM
 
 
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
 
Lisa-Maria
Posts:2
Registered: 10/29/09
Re: CharsetProvider GSM SMPP   
Nov 4, 2009 2:45 PM (reply 1 of 1)  (In reply to original post )
 
 
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
 
This topic has 1 reply on 1 page.
Back to Forum
 
Read the Developer Forums Code of Conduct

Click to email this message Email this Topic

Edit this Topic
  
 
 
Forums Statistics
    Users Online : 54
  • Guests : 135

About Sun forums
  • Sun Forums is a large collection of user generated discussions. It is here to help you ask questions, find answers, and participate in discussions.

    Check out our guide on Getting started with Sun Forums for a full walkthrough of how to best leverage the benefits of this community.

Powered by Jive Forums