Question

I was wondering if it is possible to store (in a db) special unicode characters that shows up on my system (since I have language packs or some other packs that many dont have), to be able to show as intended on all systems?

I have an example:

📱 ✉ 🔔 💻 💽

📱 ✉ 🔔 💻 💽

These show up as phone, letter, bell, computer, disk, but some browsers don't support these(show up as empty squares), so rather than saving them on images, I'd like to keep them as text somehow.

Is there anything I can do with PHP and MySQLi to make what I have in mind?

Regards.

Was it helpful?

Solution

You've already come very close to determining the problem:

I have language packs or some other packs that many don't have…

What you specifically have on your system which isn't universal is the necessary fonts. Not all systems have fonts which contain these characters, so they are unable to display them. You will need to make these fonts available to your users' browsers, possibly by embedding them as webfonts.

(Additionally, Google Chrome on Mac OS X is unable to use the default Apple Emoji font which contains some of these characters, so it is not able to display them properly either. Other fonts which contain these characters will work fine, though, so long as they are chosen at a higher priority.)

OTHER TIPS

you can use the quoted printable technique: try to save your characters encoded using : http://www.webatic.com/run/convert/qp.php and then to decode them using the php function:

quoted_printable_decode($str);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top