SMS Server Tools 3
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. The forum is currently read-only, but will open soon. Sat Oct 12, 2024 08:27
SMSTools3 Community » Help and support Bottom

Receiving emojis

Login and Post Reply

Page:  1

Author Post
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 15

Looks 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

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.

Member
Registered:
Jan 2018
Location: Austria
Topic owner
Nope, I just use a simple Sed script to post-process the text.

Member
Registered:
Jun 2018
Location: Slovak Republic
Do you mind sharing sed script?

Thank you.

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


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.

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!

Login and Post Reply

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.