SMS problems with certain characters like TAB or squared brackets

Oliver Bosse

Member
Licensed User
Longtime User
hi all,

does anyone know about a problem when sending sms with special characters?

I generate sms content dynamically from database content.
sometimes it can happen that there are certain characters in it that cause
the application to throw a null pointer exception in PhoneSms.

For example I had to replace TAB , "[" and "]" before I got it to work.

very strange.....
When there were 8 of those squared brackets in the sms content to send, it even changed the size limit to 144. as if either one of the squared brackets would count 2 characters.
could it be a character encoding problem? (i am not using utf8 nor chinese nor arabic)

does anybody know how to fix this?

oliver
 

Oliver Bosse

Member
Licensed User
Longtime User
here some extra info....

TABs always cause exceptions when they are in the content string that
is tried to be sent via PhoneSms.Send

certain characters (in my case squared brackets) seem to be counted as more than one character.
PhoneSms.Send throws an exception when the content string length is longer than 160.
now the problem...
for example when you have 150 "regular" characters and 10 squared brackets actually it should work. but it doesn't! PhoneSms.Send throws an exception. when i now delete 10 of the "regular" characters it works.
 
Upvote 0

Oliver Bosse

Member
Licensed User
Longtime User
Google is always your friend, did you try it?

GSM 03.38 Default Character Set is the first search result for "SMS character set". Note that square brackets are escaped and use two character positions and TAB is not a valid character.

thank you very very much!!!
that's what i was searching for!!

i didn't use your searchterm.
it was more like "android problem sms special characters".

so i found this
Issue 2600 - android - Problem in SMS with extended characters - Android - An Open Handset Alliance Project - Google Project Hosting

...and started believing that it could be an android or device specific problem.

thanks again, andrew! great help!
 
Upvote 0
Top