[VoiceOps] SMS, iPhones and the General Currency Symbol (¤)

Peter Beckman beckman at angryox.com
Sat Feb 6 01:34:53 EST 2016

I'm ready for it! Spent the last few days making sure MariaDB supported
utf8mb4 (turns out Mysql utf8 wasn't really the full utf8, so they added
utf8mb4 to be the real utf8), then ensuring my connections were utf8mb4 so
inserts did so properly.

This was a super-useful site that explained the importance of not using
latin1 when trying to insert or deal with utf8 characters:


I was suffering from double-encoding, due to my table being UTF8, my column
being utf8mb4, and my connection charset set to latin1 (default). So the
stuff I was storing in the DB was encoded from latin1 to utf8.

Anyway, my changes seem to have fixed that problem, so now I'm just left
with the aforementioned character.

I will share this with others looking to accept and send SMS messages using
Kannel or an HTTP API:

     * Whatever language you are using, you'll need iconv to convert between
       character sets.
     * Check to make sure your language fully supports UTF-8 before you
       start, and if not, see how to do it, or change languages.
     * Check your databse. It must accept the full 4-byte UTF-8 characters,
       and you'll need to make sure your charset when you connect via code
       or the command line is also set to UTF-8 or full support equivalent
       (see utf8mb4 for MySQL and MariaDB)
     * Test, unit test, test some more, then test with handsets. Test emoji.
       Test the Armenian Dram Sign. Find a way to pass in bad UTF-8
       characters and see how you handle it.


On Sat, 6 Feb 2016, Alex Balashov wrote:

> If you think this is fun, try multibyte/wide character currency symbols in SMS:
> https://en.m.wikipedia.org/wiki/Armenian_dram_sign
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 303 Perimeter Center North, Suite 300
> Atlanta, GA 30346
> United States
> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> Sent from my BlackBerry.

Peter Beckman                                                  Internet Guy
beckman at angryox.com                                 http://www.angryox.com/

More information about the VoiceOps mailing list