Inserting a registered trademark / copyright symbol in MySQL with PHP

I am having a hard time understanding how to embed the registered sybol symbol and copyright symbol into my mySQL database using php.

When I insert a regular registered trademark symbol, it returns some random values ​​when I try to recover it.

+8
html sql database php mysql
source share
2 answers

You can watch the conversion of the copyright / trademark symbol from and to HTMLEntity to facilitate the transfer of data to the database.

Link : http://www.php.net/manual/en/function.htmlentities.php

Link : http://www.php.net/manual/en/function.htmlspecialchars.php

© Copyright Symbol: © ;

™ Trademark symbol: ;

+16
source share

I assume that you see the specification and show values ​​such as "\ xEF \ xBF \ xBD" (see http://en.wikipedia.org/wiki/Byte_Order_Mark for more information)

You can check your character set to see if it covers values, try UTF8, not Latin or whatever you use, and see if that has changed.

0
source share

All Articles