PHP pound sterling problem

Charles Curley charlescurley at charlescurley.com
Wed Jul 18 19:47:07 UTC 2007


On Wed, Jul 18, 2007 at 04:48:22PM +0100, Gary Stainburn wrote:
> Hi folks
> 
> I have an application written in PHP using Postgresql as the back end.
> 
> If I have a text box on a form and in it type a value including a pound sign 
> everything works fine.  It is written to the database correctly, and then 
> read back and shown correctly on-screen.
> 
> However, in my code to generate a purchase order I embed the pound sign in a 
> string to be displayed and also to be used to update the database.  In both 
> cases the pound sign is replaced by a non-standard character.
> 
> I assume this is because of a character encoding issue. Can someone tell me 
> what I need to change and to what.

To which pound sign are you referring? This one: # ("sharp", or
"number sign") or this one: � (Pound Sterling)? Given your email
address, I conjecture the latter.

If the former, it should display just fine, if you have your character
set declared correctly. I recommend UTF-8.

You should probably replace the pound sterling character with its XML
character entity. You should do this for any non 7 bit displayable
ASCII character. And make sure you declare your character set
correctly. See the Character Map program under Applications ->
Accessories.

In either case, validate your HTML and CSS. http://validator.w3.org/
and http://jigsaw.w3.org/css-validator/

-- 

Charles Curley                  /"\    ASCII Ribbon Campaign
Looking for fine software       \ /    Respect for open standards
and/or writing?                  X     No HTML/RTF in email
http://www.charlescurley.com    / \    No M$ Word docs in email

Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20070718/fef3358b/attachment-0001.sig>


More information about the fedora-list mailing list