The database field type is text but any GBP sign is echoing out as '£'. Do you have any suggestions as to why?
Regards,
£ sign from database echoing as £
Moderator: General Moderators
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: £ sign from database echoing as £
Try using £ in it's place.
Also make sure your meta content-type charset is correct.
Also make sure your meta content-type charset is correct.
Last edited by aceconcepts on Wed Jan 16, 2008 8:45 am, edited 1 time in total.
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Re: £ sign from database echoing as £
You also might want to be using the Unicode (utf-8) charset - there are several ways to define this: a header(), a <meta> tag... I use both to be safe.
-
impulse()
- Forum Regular
- Posts: 748
- Joined: Wed Aug 09, 2006 8:36 am
- Location: Staffordshire, UK
- Contact:
Re: £ sign from database echoing as £
Aceconcepts - That worked fine, I used str_replace() to do the work but that seems like a dirty way of doing it.
Keiran - Does the following look good:
In
Keiran - Does the following look good:
In
Code: Select all
header('Content-Type: text/html; charset=utf-8');
<META HTTP-EQUIV="name" CONTENT="UTF-8">
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Re: £ sign from database echoing as £
Not quite...
Check out http://tlt.psu.edu/suggestions/internat ... clare.html for more (like the proper xhtml declaration, which remains poorly supported)
Code: Select all
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">