Comments (2)
Hello,
GSM and UCS2 are string codecs, just like ASCII, ISO-885-1, UTF-8, and so on.
So they are only relevant to encode and decode text.
The payload you are providing seems to be an SMS Deliver PDU - it's a binary payload containing various fields describing an incoming SMS message, text content being just one of them.
This library does not have a very good high level API to decode PDUs yet, but there is a shortcut available that you can use:
>>> from smspdudecoder.easy import *
>>> easy_sms('07919333851805420406D0D4641300002220720171424087C7B29B9E6697416376BAECA69759206AB2099A068D45D0B52804D1E561D00D744EBFE5EE34081E9ECFCBF23F280C8287CFE176D94D7F83C66F37A8EE068DC3EEB7BB0C22A741F3373B')
{
'sender': 'TIM',
'date': datetime.datetime(2022, 2, 27, 9, 17, 24, tzinfo=datetime.timezone.utc),
'content': 'Gentile cliente, TIM SAFE WEB tra 7 giorni passerà a pagamento con un canone di sol',
'partial': False,
}
from smspdudecoder.
Feel free to re-open if you have other questions, @SummerSeaSun
from smspdudecoder.
Related Issues (4)
- tox error HOT 1
- PDU encoder HOT 3
- Source text doesn't equal text after encoding and decoding 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.