Support forum

Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_TopicIcon
Sending Emoji
sp_NewPost Add Reply sp_NewTopic Add Topic
May 10, 2018
12:07 pm
Johno
Guest
Guests

Thanks for the pointer Henk!

Changing to MariaDB 32 bit OBDC driver worked!

The emotions still don't show up in the Diafaan send log correctly but as it is fine on the recipient handset I can live with this minor issue!

Thanks again

May 10, 2018
11:05 am
Johno
Guest
Guests

Perfect, thanks Henk!

I know the rest of the set up is fine because if I post from the MySQL DB directly to the route operator's API the messages with emoticons come through fine.

So I will now try using the MariaDB driver and see how it goes. 🙂

Thanks again

May 10, 2018
10:44 am
Henk Helmantel
Admin
Forum Posts: 1488
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

I have installed a couple of test systems with different versions of MySQL and the MySQL ODBC driver to find out if the emoticons worked and could not get it to work either on most test systems. The only consistent solution that I could find is to use the MariaDB ODBC driver instead of the MySQL ODBC driver. You can install both ODBC drivers at the same time so installing it won't have any effect on other applications. Emoticons worked straight away with the MariaDB ODBC driver on the uft8mb4 encoded databases that I tested but for some MySQL database installations it might be necessary to create a Data Source Name (DSN) in the Microsoft ODBC Data Source manager with some additional settings.

The connection string that I used for the MariaDB ODBC driver is:

Driver={MariaDB ODBC 3.0 Driver};Server=192.168.0.30;Port=3306;User=db_user;Password=db_password;Database=SMSServer;Charset=utf8mb4

The problem with the MySQL ODBC driver seems to be the connection between the MySQL database and the MySQL ODBC driver. Even if all character encoding settings in the database are correct, 4-byte unicode characters are not transported correctly, sometimes this results in question marks, sometimes in garbled text and sometimes in an error message. 1-byte, 2-byte and 3-byte unicode characters are usually processed correctly.

Hope this helps.

Regards, Henk

May 8, 2018
4:48 pm
Johno
Guest
Guests

Further to my previous message I tested many Unicode characters and they seem to be working fine but emoticons/emojis are not. I haven't been able to find one that works yet..

As they appear fine in the DB but as ?? in the Diafaan sending log according to your diagnosis I will assume it to be an issue with the SQL connector? In which case what sort of issues with the connector can cause the emotions not to display in the log and recipient handset and how can I get around this?

If it's a MySQL problem - even though as I say the characters appear fine in the DB, and you can recommend another DB option I'm happy to try it?

Thanks again,
Johno

May 8, 2018
4:10 pm
Johno
Guest
Guests

Thanks for the reply Henk,

Yes I'm using MySQL 5.7.22 and the database and tables are correctly configured as UTF8MB4 The emojis show up correctly in the database. I have the DB set up pretty much the way mentioned in the link you posted and here is my connection string:
Driver={MySQL ODBC 5.1 Driver};Port=3306;Server=xx.xx.xx.xx;charset=UTF8MB4;Database=SMSServer;User=xxxxxxxx;Password=xxxxxxxxxx;Option=3;

When Diafaan collects the record from the MessageOut table and sends it it shows up in the log as ? I think I have it working for most Unicode chars now but emoticons are still sending as ??

Thanks

May 8, 2018
3:54 pm
Henk Helmantel
Admin
Forum Posts: 1488
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

Hello Johno,

Internally, Diafaan SMS Server has full support for all unicode characters. But when it imports messages from a database or sends the messages to an SMPP gateway the encoding or decoding of the unicode characters sometimes goes wrong. If the messages are not correct in the send log of Diafaan SMS Server then the problem is located in the SQL Connector. If the messages are correct in the send log but not on the receiving mobile phone then the problem is located in the SMPP Gateway.

You do not specify which database you are using but you are probably using MySQL because this is a common problem with MySQL databases.

The unicode support of MySQL with ODBC drivers does not always work properly. The combination of the MySQL version, ODBC driver version, database layout and connection string has to be correct otherwise the unicode character will be converted to question marks or to a garbled text. Some combinations work well for normal unicode characters but not for emoticons that fall outside the UCS-2 unicode characters. You can find a description of a working combination for MySQL on this website.

Regards, Henk

May 8, 2018
11:58 am
Johno
Guest
Guests

Hi Henk,

I'm having serious issues trying to send emojis and other UTF8/UTF16 characters. The sql database is encoded correctly so when the message is posted to the SQL server it appears correctly however when the connector picks it up it doesn't send it correctly.

If I set DCS to 8 (Unicode) the message comes through with Chinese characters. If I set it to anything else the Unicode characters show as a question marks ??

I have set the message type to auto and Unicode and text and the results are not as expected. Can you shed some light on what is happening here and if there is a workaround?

Many Thanks,
Johno

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 529

Currently Online:
7 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Member Stats:

Guest Posters: 672

Members: 0

Moderators: 0

Admins: 1

Forum Stats:

Groups: 2

Forums: 3

Topics: 1141

Posts: 3899

Newest Members:

, Henk Helmantel

Administrators: Henk Helmantel: 1488