Java and Hex character representation

I am trying to send a square bracket to the phone using logica smpp 1.3.7. I am using dataCodingSetting 3 - according to the network I asked about it. They reported that I need to pack my message as shown below:

You want to send ASCII Send the following Character Decimal Hex Character Hex Decimal [ 91 5B <ESC>< 1B 3C 27 60 

My question is: I do not know what this symbol is: ESC <And if I put only the value Hex 1B 3C, it is displayed on the phone exactly like this: 1B 3C

+4
source share
1 answer

I think they want the string to contain bytes 0x1b and 0x3c, so:

 sm.setShortMessage(new String(new byte[] { 0x1b, 0x3c })); 
+6
source

Source: https://habr.com/ru/post/1493586/


All Articles