Re: PHP pound sterling problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: pgp1n7HNnEGWQ.pgp
Description: PGP signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux