471,825 Members | 957 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,825 software developers and data experts.

? character displays instead of pound sign

hi im outputting text from a db and where a sign has been entered a
? character appears instead which i cant seem to get rid of with a
simple str_replace. is their a way to get rid of it? and what is
causing it?

regards

marc

Sep 5 '06 #1
4 13897
My best guess (and that's all it really is - I just figured I'd have a
go at this) is that the character set is not correct for what you're
trying to do. The '?' is often used when the character set does not
support a character that is being displayed. I know that the character
set can be changed using a meta tag in simple html.

I hope that helps somewhat.
monomaniac21 wrote:
hi im outputting text from a db and where a sign has been entered a
? character appears instead which i cant seem to get rid of with a
simple str_replace. is their a way to get rid of it? and what is
causing it?

regards

marc
Sep 5 '06 #2
In message <11*********************@b28g2000cwb.googlegroups. com>
"monomaniac21" <mc******@googlemail.comwrote:
>hi im outputting text from a db and where a sign has been entered a
? character appears instead which i cant seem to get rid of with a
simple str_replace. is their a way to get rid of it? and what is
causing it?

regards

marc
Try &pound; for
--
Kev Wells http://kevsoft.topcities.com
http://kevsoft.co.uk/
ICQ 238580561
Walk upon England's mountains green?
Sep 5 '06 #3
>
Try &pound; for
--
i cant as it is the user entering the pound into textarea.

Sep 5 '06 #4
monomaniac21 wrote:
>Try &pound; for
--

i cant as it is the user entering the pound into textarea.
Excuse me.. you mean you are accepting user input with your eyes wide
shut ?!?! No validation or formatting at all ?
Bad practice to start with...

But hey.. it's your app that will get hacked, not mine.

For solving the ? puzzle, set the form encoding to the correct charset,
set the page encoding to the correct charset, send a good charset header
and use htmlentities() *with* the optional encoding parameter.

It that doesn't help you, be more specific in your question.

Sep 5 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Robert Zierhofer | last post: by
4 posts views Thread by ben | last post: by
5 posts views Thread by Waldy | last post: by
6 posts views Thread by Anthony | last post: by
7 posts views Thread by kingski | last post: by
2 posts views Thread by Per Rasmussen | last post: by
1 post views Thread by watcher00 | last post: by
4 posts views Thread by jaems | last post: by
NeoPa
reply views Thread by NeoPa | last post: by
reply views Thread by YellowAndGreen | last post: by
aboka
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.