I am sending to the SMSC for example this string "[ ]" which encodes to a byte[] in hex "1B3C201B3E" according to GSM 7-bit alphabet where the "1B" is the character for the extra 10 characters and 3C is "[" and 3E is "]" accordingly but it won't print print correctly on my cellphone which prints " < >" because it prints "1B" as space and the "<" = "3C" and ">" = "3E". Also, it can't print any of the weird characters "èéùìòÇØøÅ倯æßÉ@¤¡ÄÖÑܧ¿äöñüà" but works fine with Greek chars. Is it my error or it has something to do with the specific SMSC? Is the byte[] correct or not?
Can't get the extra escape characters to work in GSM 7-bit alphabet.
2.1k views Asked by Nikolaos Plastiras At
2
There are 2 answers
0
aleung
On
You let data_coding to default(0), which means you don't specify the alphabet using in the pdu . SMSC will decode it using the default configured alphabet on SMSC side.
In your case, it looks like that the SMSC isn't configured to use GSM 7-bit as default. The possible default alphabet is Latin (ISO-8859-1), because in Latin, 0x3C is "<" and 0x3E is ">", 0x1B is not printable so it's translated to space.
So you could try to encode your message in ISO-8859-1.
Related Questions in JAVA
- I need the BIRT.war that is compatible with Java 17 and Tomcat 10
- Creating global Class holder
- No method found for class java.lang.String in Kafka
- Issue edit a jtable with a pictures
- getting error when trying to launch kotlin jar file that use supabase "java.lang.NoClassDefFoundError"
- Does the && (logical AND) operator have a higher precedence than || (logical OR) operator in Java?
- Mixed color rendering in a JTable
- HTTPS configuration in Spring Boot, server returning timeout
- How to use Layout to create textfields which dont increase in size?
- Function for making the code wait in javafx
- How to create beans of the same class for multiple template parameters in Spring
- How could you print a specific String from an array with the values of an array from a double array on the same line, using iteration to print all?
- org.telegram.telegrambots.meta.exceptions.TelegramApiException: Bot token and username can't be empty
- Accessing Secret Variables in Classic Pipelines through Java app in Azure DevOps
- Postgres && statement Error in Mybatis Mapper?
Related Questions in ENCODING
- When sanitize/encode while implementing tags system like on SO
- Generating synthetic data for .ORC file in python
- WebClient.UploadData is returning control characters after non-ascii characters
- How to switch encoding of LibreOffice strings in Java UNO API?
- Userform to answer original userform
- Encoding problem on MySQL: Why some non-ASCII characters get encoded on more than 4 bytes?
- What encoding does the 'text' response type option in HttpClient use?
- Issue downloading audio with ytdlp on a raspberry pi
- KeyError: "['Building Age', 'Floor', 'Number of Floors'] not in index"
- FFMPEG fast quality video encoding without quality loss & less storage occupancy (maybe using GPU)
- Encoding attributes in an Genetic Algorithm
- React - MP4 - The file was loaded in a wrong encoding - 'UTF-8'
- How to re-encode an audio to match another one, to avoid re-encoding the whole audio
- Sqlalchemy - PostgreSQL - UnicodeDecodeError
- Calculate difference in encoding WITHOUT actually writing to a file?
Related Questions in GSM
- How do I publish sensor data to EMQX broker on Ubuntu from a remote Arduino (no WiFi) interfaced with SIM800L?
- Not able to recieve message sent from mobile to GSM SIM900 but other functionalities working
- I'm Trying to Connect Internet with ESP32 using Cavlii C16Qs. but ESP32 is not Getting Internet Connectivity
- Increase CoAP receive package size beyond 579 bytes on SIM7080G modem
- OTA using Azure
- GSM 7600 Series AT Command (CEREG)
- GSM device server communication
- How can I get Latest Network Time Synchronization of quectel UC15 GPRS modem?
- GSM and LTE-M connection with SIM7070G for MQTT data transmission
- how to make a clear voice call using sim900
- How do I read EF.PLMNsel?
- How can I upload a SIM applet through OTA
- Is there any TTS library that can be used in STM32
- In Android InCallService, DTMF sound is not heard when between smartphone call
- OTA using Azure IotHub for stm32 and gsm module interfaced board
Related Questions in SMPP
- Beginner's guide to setting up SMPP with Java EE
- Accept requests using smpp python
- SMPP Bind Failed Error: Unable to Establish Connection with SMSC and Getting 'Bind Failed' Error While Trying to Connect to SMPP Server
- Intelab smpp client library
- No incoming Sms by SMPP from GoIP1 to Kannel or Ozeki
- Message truncation on submit SM
- Cannot setup Apache Camel SMPP to receive messages from SMSC node using GSM-7
- SMPP Server Development in Python
- smpp node, whenever I send an SMS, do I need to create a new connection?
- Error sending SMS with Golang SMPP protocol: Unknown address
- Obtaining a USSD code and a response to it using the USSD menu, using the smpplib v2.2.3 library
- Python custom alertscript in zabbix doesn't work properly
- SMPP Error - RangeError [ERR_OUT_OF_RANGE]: The value of "value" is out of range. It must be >= 0 and <= 255. Received 279
- Sending unicode SMS issue
- C# send or receive data was disallowed because the socket had already been shut down
Related Questions in 7-BIT
- Convert GSM 7bit packed to text using Cygwin
- Reading 7BitEncodedInt in Javascript
- PHP converting/encoding to 7bit binary string
- Python Decode OctetString 7-bit Characters
- Convert Extended ASCII or Unicode to 7-bit ASCII (<128) equivalent including special characters
- Does SMTP transfer 7bit or 8bit characters (clear MSB or not?)
- Multer Encoding Issue: localized text getting converted random character
- 7-bit circular buffer with bit option flag in a byte
- android generating 7 bit checksum for passing data to a bluetooth module
- Having an issue with Mailkit / Mimekit, seven bit encoding, and dot-stuffing
- Short (ASCII, 7-bit per character) string storage and comparison optimization in C++
- Seven bit and two compliment
- Accessing 8-bit data as 7-bit
- Calculate SMS Length/Parts C#
- Read a File Object with nodejs
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You need to choose one data_coding (or encoding scheme) based on the kind of characters that you need to use. Page 136 of the SMPPv4 protocol spec document shows you what data codings you can use.
Then for example, if you choose UCS2 you can make msg.getBytes("UCS2") and set your datacoding to 8 and that will make any UCS2 representable characters shown well in the phone.
I think that if you need to use GSM 7-bit alphabet you need to set datacoding to 1, then you need a gsm 7-bit alphabet encoder, from string to bytes, I think that is not available in standard jdk