Comments (2)
Hi,
Thanks for the report.
Do you already have an idea why this might happen?
from smspdudecoder.
It seems like you have been using the GSM encoding.
There is a caveat that requires padding in certain situations:
https://github.com/qotto/smspdudecoder/blob/master/smspdudecoder/codecs.py#L87
In your case, you should consider using the following code:
from smspdudecoder.codecs import GSM
text = 'ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÑܧ¿abcdefghijklmnopqrstuvwxyzäöñüà'
assert GSM.decode(GSM.encode(text, with_padding=True), strip_padding=True) == text
I probably need to create a new version of the package where padding is enabled by default, to be in-line with the GSM specifications:
![image](https://private-user-images.githubusercontent.com/1610035/329651369-9496ed24-9189-4c5a-bfae-7ba778f35936.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTYxNDQyNzQsIm5iZiI6MTcxNjE0Mzk3NCwicGF0aCI6Ii8xNjEwMDM1LzMyOTY1MTM2OS05NDk2ZWQyNC05MTg5LTRjNWEtYmZhZS03YmE3NzhmMzU5MzYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDUxOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA1MTlUMTgzOTM0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDkyYzY4ZWY5N2U5MWFlMDRjMTU4ZDVlOTA1NmFiY2I5ZmM2MTIyMmMxNDc4NjY1OWM3YTFlMDkxZTk5NjBhZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.vGm4lrZ8O_GCyTupmmVlzZjgKRYFRYcqwnUh3A4xHek)
from smspdudecoder.
Related Issues (4)
- tox error HOT 1
- PDU encoder HOT 3
- GSM.decode strange result HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smspdudecoder.