469,362 Members | 2,441 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,362 developers. It's quick & easy.

? 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 13782
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
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.