java - Can't get the extra escape characters to work in GSM 7-bit alphabet. -
i sending smsc example string "[ ]" encodes byte[] in hex "1b3c201b3e" according gsm 7-bit alphabet "1b" character 10 characters , 3c "[" , 3e "]" accordingly won't print print correctly on cellphone prints " < >" because prints "1b" space , "<" = "3c" , ">" = "3e". also, can't print of weird characters "èéùìòÇØøÅå€ÆæßÉ@¤¡ÄÖÑܧ¿äöñüà" works fine greek chars. error or has specific smsc? byte[] correct or not?
you need choose 1 data_coding (or encoding scheme) based on kind of characters need use. page 136 of smppv4 protocol spec document shows data codings can use.
then example, if choose ucs2 can make msg.getbytes("ucs2") , set datacoding 8 , make ucs2 representable characters shown in phone.
i think if need use gsm 7-bit alphabet need set datacoding 1, need gsm 7-bit alphabet encoder, string bytes, think not available in standard jdk
Comments
Post a Comment