Skip to content

Fix UCS-2 encoding: fixes #49 and #53#59

Merged
eigenein merged 1 commit into
python-smpplib:masterfrom
eigenein:fix/ucs-2
Oct 15, 2018
Merged

Fix UCS-2 encoding: fixes #49 and #53#59
eigenein merged 1 commit into
python-smpplib:masterfrom
eigenein:fix/ucs-2

Conversation

@eigenein

@eigenein eigenein commented Oct 15, 2018

Copy link
Copy Markdown
Collaborator

This should close #49 and #53.

Comment thread smpplib/gsm.py
# Split the text into well-formed parts.
esm_class = consts.SMPP_GSMFEAT_UDHI
# FIXME: 7-bit encoding has variable-length characters.
# FIXME: it means that a character may be broken by splitting.

@eigenein eigenein Oct 15, 2018

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just had a thought that there's another issue too. We check len(text) but later we split encoded byte-string. It means that 2-byte characters are encountered as they were 1-octet characters.

@SuperMasterBlasterLaser

Copy link
Copy Markdown

NIce

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.

function make_parts_encoded work not correct

2 participants