Comments (17)
Can you attach problem file with this message from sent directory?
from smstools-http-api.
message contains aą eę oó
When i send sms contans normal character and ó, ó does not show at all .
When send sms witch other polish letters showing as "chinese character".
2d96a043-acee-4270-a76b-672ce0c0fb10.txt
from smstools-http-api.
Tell me your python version.
from smstools-http-api.
Python 3.6.5
from smstools-http-api.
Is any chanse to correct this?
from smstools-http-api.
Now I can't repeat this. But I see incorrect data in your file. You need to stop smstool and attach the created file from outgoing directories.
from smstools-http-api.
more info about system:
System Locale: LANG=en_US.UTF-8
VC Keymap: pl
X11 Layout: pl
[root@localhost ~]# hostnamectl
Static hostname: localhost.localdomain
Icon name: computer-desktop
Chassis: desktop
Machine ID: 5b7f01fd343148b59dc6aaad9a1c3c22
Boot ID: 6235ab5fa6b240a4821e50dca1b23c73
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-862.3.2.el7.x86_64
Architecture: x86-64
3b1bddc5-1629-4f11-b405-f57092d1bfaf.txt
I will try install on debian.
from smstools-http-api.
On debian 9.4, Python 3.5.3 the same issue
from smstools-http-api.
I see that bytes string in your file and bytes string from source chars is different in last position. How you send this message?
lvv@linux-kqvd:~> python3
Python 3.4.6 (default, Mar 22 2017, 12:26:13) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> f=open('3b1bddc5-1629-4f11-b405-f57092d1bfaf.txt', 'rb')
>>> line=f.readlines()
>>> line[-1].decode('utf-16-be')
'aą eę oï뾽'
>>> line[-1]
b'\x00a\x01\x05\x00 \x00e\x01\x19\x00 \x00o\x00\xef\xbf\xbd'
>>> uni_str='aą eę oó'
>>> uni_str.encode('utf-16-be')
b'\x00a\x01\x05\x00 \x00e\x01\x19\x00 \x00o\x00\xf3'
>>>
from smstools-http-api.
By curl:
curl -u user:pass -i -H "Content-Type: application/json; charset=UTF-8" -d '{"text":"aąeęoó", "mobiles":["+48111111111"]}' http://127.0.0.1:5000/api/v1.0/sms/outgoing
via web browser
http://user:[email protected]:5000/api/v1.0/sms/outgoing?text=aąeęoó&mobiles=+4811111111
from smstools-http-api.
Can you repeat this steps?
lvv@linux-kqvd:~> curl -u lvv:SecretPAss -i -H "Content-Type: application/json; charset=UTF-8" -d '{"text":"aąeęoó", "mobiles":["+48111111111"]}' http://127.0.0.1:5000/api/v1.0/sms/outgoing
HTTP/1.0 200 OK
Content-Type: application/json
Content-Length: 298
Server: Werkzeug/0.14.1 Python/2.7.13
Date: Tue, 19 Jun 2018 13:06:57 GMT
{
"mobiles": {
"+48111111111": {
"dlr_status": "http://127.0.0.1:5000/api/v1.0/sms/sent/780e5ce0-0b69-4096-b90d-05617af7f80a",
"message_id": "780e5ce0-0b69-4096-b90d-05617af7f80a",
"response": "Ok"
}
},
"parts_count": 1,
"sent_text": "a\u0105e\u0119o\u00f3"
}
lvv@linux-kqvd:~> python3
Python 3.4.6 (default, Mar 22 2017, 12:26:13) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> str_unicode="a\u0105e\u0119o\u00f3"
>>> print(str_unicode)
aąeęoó
from smstools-http-api.
curl -u user:pass -i -H "Content-Type: application/json; charset=UTF-8" -d '{"text":"aąeęoó", "mobiles":["+48811111111"]}' http://127.0.0.1:5000/api/v1.0/sms/outgoing
HTTP/1.0 200 OK
Content-Type: application/json
Content-Length: 298
Server: Werkzeug/0.14.1 Python/3.5.3
Date: Tue, 19 Jun 2018 13:14:54 GMT
{
"mobiles": {
"+41111111111": {
"dlr_status": "http://127.0.0.1:5000/api/v1.0/sms/sent/fd31aa0b-c72e-4564-80d8-896856d36ee0",
"message_id": "fd31aa0b-c72e-4564-80d8-896856d36ee0",
"response": "Ok"
}
},
"parts_count": 1,
"sent_text": "a\u0105e\u0119o\u00f3"
}
sms@term:~$ python3
Python 3.5.3 (default, Jan 19 2017, 14:11:04)
[GCC 6.3.0 20170118] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> str_unicode="a\u0105e\u0119o\u00f3"
>>> print(str_unicode)
aąeęoó
from smstools-http-api.
This file is from sent folder:
b8d44766-559c-49ef-9388-866a5d7c0941.txt
smstools 3.1.21 config:
devices = GSM1
loglevel = 7
smart_logging = yes
logfile = /var/log/sms/smstools.log
outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
failed = /var/spool/sms/failed
incoming = /var/spool/sms/incoming
sent = /var/spool/sms/sent
delaytime = 1
errorsleeptime = 3
blocktime = 30
autosplit = 3
receive_before_send = no
max_continuous_sending = 7200
[GSM1]
device = /dev/ttyUSB0
incoming = no
check_memory_method = 0
pin = 1111
pinsleeptime = 0
baudrate = 9600
check_network = 1
mode = new
pre_init = no
detect_unexpected_input = no
status_include_counters = no
status_signal_quality = no
device_open_retries = 10
from smstools-http-api.
I found bug (specific for Python3). Do git pull and try again...
from smstools-http-api.
Thank You
It works almost well.
If I send an SMS containing the only ó, it changes it to o.
Or i if a send text something like abcdeówert
it changes it to o
Works perfectly if sms contains other polish characters like ą ź ń ć
from smstools-http-api.
Thanks, try again.
from smstools-http-api.
Works perfect.
Thank You very much.
from smstools-http-api.
Related Issues (9)
- APIARY DOC HOT 1
- AttributeError: 'Blueprint' object has no attribute 'json_encoder' HOT 2
- RuntimeError: maximum recursion depth error HOT 1
- Does NOT work out of the box - insufficient documentation to prevent 401 Not Authorized
- IOError: [Errno 2] No such file or directory: when trying to send SMS HOT 1
- Listing messages with different From header HOT 4
- REQUEST - SMS Status Report in message info HOT 2
- Enhancement : Allow to delete SMS 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 smstools-http-api.