Solved

echo symbols in sql

Posted on 2013-06-03
6
315 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
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

773 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