473,414 Members | 1,751 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 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 13983
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Robert Zierhofer | last post by:
hi there, it seems as if i can´t convert the euro and pound sign to their html equivalents. i tried eregi_replace("€", "&euro;", $haystack); eregi_replace("£", "&pound;", $haystack); as...
4
by: ben | last post by:
Hi all, I have a simple PHP page that takes values from a form and puts them in a database (MySQL). The code is in a file test.php, which I have typed in at the bottom of this post (please...
5
by: Waldy | last post by:
Hi there, I am using the .Net XML Serialization classes to create XML strings. This has been working fine up until the point that one of the strings contained a pound sterling symbol. The...
6
by: Anthony | last post by:
When using StreamReader/Writer to process an input text file to an output text file the pound signs (£) simply disappear. Sample code: StreamReader sr = new StreamReader("input.txt");...
7
by: kingski | last post by:
Any idea about this ? http://www.developerfusion.co.uk/forums/thread/114379/#114379 "Can any one help me as i am building a shopping cart and it supports multiple currencies but while sending...
2
by: Per Rasmussen | last post by:
When I use a StreamReader to read lines from a file, it seems to skip some "special" characters like ?, æ, ø and å. How do I prevent it from doing this? I know it works if the text file is in...
1
by: watcher00 | last post by:
every time i try to print "£" i get "ú" instead This print("£"); produces ú rather than £ how can i change this?
5
by: ramaswamynanda | last post by:
Hello, I have a currency field on my form. The default formats for this field are dollar, euro. There is no pound symbol.....How do i put in a currency format, having the pound sign. Any help...
4
by: jaems | last post by:
my code <font size="2">Approx </font>&nbsp;£&nbsp; which I intend to display as: Approx £ Displays as Approx £
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.