score:0
You can convert the trademark, copyright or other symbols into/out database via an HTMLEntity
The htmlentities()
function converts characters to HTML entities.
Reference: http://www.php.net/manual/en/function.htmlentities.php
Reference: http://www.php.net/manual/en/function.htmlspecialchars.php
® Registered Trademark ®
™ Trademark Symbol: ™
Other useful information and symbols can be found here: http://www.w3schools.com/html/html_entities.asp
score:1
You can use html character entities instead of direct symbol
Do not use
®
Try it
®
score:1
These types of encoding issues can get complex when dealing with different character sets. In these cases, just changing the collation will not fix the problem, you need to change the CHARSET
. Only after changing the CHARSET
should you worry about the collation (they are not the same thing).
Just to be safe, export your database/table before altering it.
I would begin, by converting the table to utf8
since it is now the standard.
ALTER TABLE tbl_name
CONVERT TO CHARACTER SET utf8
By doing this, it will also change the CHARSET
of the table and columns to utf8, but you may still need to manually change the collation of the columns to utf8_general_ci
(seems like you have already done that).
In the event you want to change the default character set (for new columns)...
ALTER TABLE tbl_name
DEFAULT CHARACTER SET utf8
EDIT :
If changing the CHARSET
in the database doesn't work, you can try setting it on the PHP side. Just add this after your connection.
mysql
mysql_set_charset("utf8");
mysqli
$mysqli->set_charset("utf8");
PDO
PDO::MYSQL_ATTR_INIT_COMMAND => "SET CHARACTER SET 'utf8'"
Here is some helpful documentation:
10.1 Character Set Support
10.1.12 Column Character Set Conversion
10.1.13.1 Unicode Character Sets
More questions
- Perl Insert Trademark Symbol into Mysql
- PHP MySql display returned content without html tags being stripped
- Cannot bind mysql data to html template in golang
- HTML Select box (populated by mySQL) on click display url from mySQL to textbox or div
- Laravel cannot display mysql records over 10,000
- How to display mysql query result in html table in nodejs?
- I cannot retrieve & display images from MYsql to table column
- How can I display (onload) an on/off button in html depending on a value in a mysql database?
- Retrieve HTML from MySQL and display in textarea
- Popup message cannot display new update records from php mysql
- Display mysql data in HTML Table - Latest entry to be shown @ top of table
- How can I insert multiple rows in mysql from an html table that used php echo for display
- How to display mysql data in html rows
- How to properly return or display multiple rows to html from the result of mysql query in render template
- Update database table without HTML form tag and get a specific value from MySQL table and display
- Cannot display special characters from mysql database using Codeigniter ..Display "Description"
- Display data collected from MYSQL to html page using AngularJs and PHP
- How to display results from a MySQL query in a HTML table
- Display MySQL query result as HTML tables per row
- how to display mysql query output in HTML Horizontal table
- I need to display the number of years that each country has been independent from a column but cannot do so mysql
- How to display MySQL content in an HTML table with PHP
- Cannot display Image blob from MySQL in PHP on my live environment, works on dev
- Cannot Display Data from MySQL table
- Grafana worldmap panel: latitude and longitude in mysql cannot display points on map
- How to retrieve mysql data and display it in html
- How to display a link from the MySql database in html using jquery or php
- Display mysql rows in html table
- PHP won't grab email addresses from MySQL database to display in html doc
- I need to display a MYSQL query in HTML in volving COUNT(*)
More questions with similar tag
- Laravel Eloquent how to limit access to logged in user only
- MySQL select query with where condition using string variables
- where clause with not null variables
- How to Do Efficient JOIN on multiple table in MySQL or SQL Server?
- Which collation is preferred when sorting is not required?
- Set same random value twice in one query for encryption in MySql
- php mysql data from database input to contact form
- PHPbb DBAL refuses to Execute Correct PHP and SQL
- Perl DBIC for nested queries in a dynamically created set of conditions
- Separate databases in symfony 4
- PHP/MySQL 2 'while' statements from 1 mysql query?
- Updating multiple records from database at once
- How to insert the same UUID in two rows of two different tables
- Question about code execution and the nature of javascript blocking/ non blocking
- Insert Multiple Value into table MySQL if not exists
- How to sum month in Google Big Query?
- How to use join and order_by with multiple records in SQL/SQLalchemy?
- Speed up counting query in Django
- Update differents fields based on criterias in MySQL
- how to display all data in the left table only once and display matching data on the right table
- Updating a table in Django
- parent data display with child count
- How to produce two column that will not repeat the data
- How to ensure all data going in and out of a database is utf-8 encoded?
- Is there a MySQL seed database dump for Adempiere ERP 380
- Inserting UUID In MySQL From PHP
- Prohibit PHP Function To Echo Results In Front-End, When Using For MySQL Query
- Evaluate string values in a single column (mysql)
- Insert json data into mysql database using php
- Case sensitive aes_decrypt query