Link to home
Start Free TrialLog in
Avatar of Neil_Bradley
Neil_BradleyFlag for New Zealand

asked on

echo symbols in sql

Hi all,
I have a database full of strings that look like this:
company name ®  some text

When I echo the string all registered trademark symbols turn into question marks.
Apart from converting the symbols into "©", does anyone have any ideas how to remedy this?
Cheers,
N
Avatar of Loganathan Natarajan
Loganathan Natarajan
Flag of India image

How it looks in db table text filed? Is it like question marks way stored or it is right way?
If so, you set some encoding type and display?
if there are turning into question marks the data probably isn't being stored as UTF8
what is your database? (and version?)
Avatar of Neil_Bradley

ASKER

To answer both questions.
Yes, the symbols are showing up fine in the database (they look like this ® ).

Database info:
•Software: MySQL
•Software version: 5.0.96-community - MySQL Community Edition (GPL)
•Protocol version: 10
• Server charset:  UTF-8 Unicode (utf8)
did you set content type like below,

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
ASKER CERTIFIED SOLUTION
Avatar of Jagadishwor Dulal
Jagadishwor Dulal
Flag of Nepal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That worked perfectly! Thank you.

I  checked and this "<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />" was in place.
Cheers,
Neil