Author |
Post |
|
#1 Sat Jan 06, 2018 20:21, 82 months ago.
|
Member
Registered: Jan 2018
Location: Austria
|
I am no friend of emojis but I happen to receive them more frequently recently. So far, I failed to preserve or decode them correctly. Eg. when I decode a PDU using the PDU converter the result is However, the spool file contains The text as hex is: 48 c3 a4 6c 6c c3 b6 20 3d 00 15Looks to me like smsd did not convert the emojis correctly. Though, I might just have missed an important config setting!? Any idea? -- Operating system name and version: Debian 8.9 amd64 Version of smsd: 3.1.15 Smsd installed from: Debian package repository Name and model of a modem: Huawei E220/E230/E270/E870 HSDPA/HSUPA
|
|
#2 Mon Mar 25, 2019 11:56, 67 months ago.
|
Member
Registered: Jun 2018
Location: Slovak Republic
|
Have you found solution to this? I have the same problem. I would like to try this patch (it should be released with version 3.1.22) - but there is still only 3.1.21 available for download.
|
|
#3 Tue Mar 26, 2019 21:26, 67 months ago.
|
Member
Registered: Jan 2018
Location: Austria
Topic owner
|
Nope, I just use a simple Sed script to post-process the text.
|
|
#4 Wed Mar 27, 2019 08:58, 67 months ago.
|
Member
Registered: Jun 2018
Location: Slovak Republic
|
Do you mind sharing sed script?
Thank you.
|
|
#5 Wed Mar 27, 2019 10:14, 67 months ago.
|
Member
Registered: Jun 2018
Location: Slovak Republic
|
Nevermind,... found this one that does the job this post#!/bin/bash
if [ "$1" == "RECEIVED" ]; then
if sed -e '/^$/ q' < "$2" | grep "^Alphabet: UCS2" > /dev/null; then TMPFILE=`mktemp /tmp/smsd_XXXXXX` sed -e '/^$/ q' < "$2" | sed -e 's/Alphabet: UCS2/Alphabet: UTF-8/g' > $TMPFILE sed -e '1,/^$/ d' < "$2" | iconv -f UTF-16BE -t UTF-8 >> $TMPFILE mv $TMPFILE "$2" fi
fi 'bash' Syntax Highlight powered by GeSHi
|
|
#6 Thu Mar 28, 2019 23:07, 67 months ago.
|
Member
Registered: Jan 2018
Location: Austria
Topic owner
|
I am using an event handler. However, my smsd (smstools 3.1.15 on Debian 9) does not properly decode incoming SMS. For instance, for emojis it produces either Alphabet ISO or UTF-8 depending on the setting of incoming_utf8 = no/yes. It's never UCS2 and stuff like emoji is broken.
No big issue though, and might very well be fixed in newer versions.
|
|
#7 Sat Mar 30, 2019 12:29, 67 months ago.
|
Member
Registered: Jun 2018
Location: Slovak Republic
|
I am using version 3.1.21 and without this new sed eventhandler, emojis were like garbled text that broke my php part after saving to database. I was (still am) using php eventhandler. Now I use this new sed and after I fix received sms with iconv, I call may php eventhandler, that does the rest of processing before saving to database. So far, emojis are showing as they should.
One of posts from keke was saying about version 3.1.22 (late year 2017) that should fix some of these issues, but probably keke is too busy to upgrade version. Anyway, great job from keke!
|