Skip to content

Supports emojis and sending long text messages.#1

Open
zwc456baby wants to merge 1 commit intojaydenpung:masterfrom
zwc456baby:master
Open

Supports emojis and sending long text messages.#1
zwc456baby wants to merge 1 commit intojaydenpung:masterfrom
zwc456baby:master

Conversation

@zwc456baby
Copy link

The main modifications involve three methods:

decodeUcs2 and encodeUcs2 Supports emojis. Otherwise, you will not be able to receive or send messages containing emojis.


_decodeUserData() :

        if dataCoding == 0x00: # GSM-7
            # Since we are using 7-bit data, "fill bits" may have been added to make the UDH end on a septet boundary
            shift = ((udhLen + 1) * 8) % 7 # "fill bits" needed to make the UDH end on a septet boundary
            # Simulate another "shift" in the unpackSeptets algorithm in order to ignore the fill bits
            if shift:
                prevOctet = next(byteIter)
                shift += 1
            else:
                prevOctet = 0

The _decodeUserData() method must be modified to support sending long text messages; otherwise, sending will fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants