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)?