Solved

echo symbols in sql

Posted on 2013-06-03
6
318 Views
Last Modified: 2013-06-03
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
0
Comment
Question by:Neil_Bradley
6 Comments
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 39217942
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?
0
 
LVL 48

Expert Comment

by:PortletPaul
ID: 39217944
if there are turning into question marks the data probably isn't being stored as UTF8
what is your database? (and version?)
0
 
LVL 5

Author Comment

by:Neil_Bradley
ID: 39217949
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)
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 39217955
did you set content type like below,

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
0
 
LVL 15

Accepted Solution

by:
Jagadishwor Dulal earned 500 total points
ID: 39217961
Did you try using
&reg;

Open in new window

0
 
LVL 5

Author Closing Comment

by:Neil_Bradley
ID: 39217983
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
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question