symbol?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
FireElement
Forum Commoner
Posts: 86
Joined: Wed Oct 17, 2007 6:03 pm

symbol?

Post by FireElement »

Hello,

I am trying to get the following symbols to print out when called from a sql database € and ¥ . I keep getting a �.

Can anyone tell me how I can decode the symbols so they come out normally!

Thanks
php_daemon
Forum Newbie
Posts: 3
Joined: Thu Dec 06, 2007 4:35 am

Post by php_daemon »

utf8_encode()
devendra-m
Forum Contributor
Posts: 111
Joined: Wed Sep 12, 2007 3:16 am

Post by devendra-m »

I think you should set this at top in php
ini_set('default_charset', 'UTF-8');

and html

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />


and do not use css to print that kind of symbols


i hope it works
FireElement
Forum Commoner
Posts: 86
Joined: Wed Oct 17, 2007 6:03 pm

Post by FireElement »

devendra-m wrote:I think you should set this at top in php
ini_set('default_charset', 'UTF-8');

and html

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />


and do not use css to print that kind of symbols


i hope it works
I have <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
at top of every page so its not that....

But I will ini_set('default_charset', 'UTF-8');

see if that works...
FireElement
Forum Commoner
Posts: 86
Joined: Wed Oct 17, 2007 6:03 pm

Post by FireElement »

php_daemon wrote:utf8_encode()
that did not work :(
FireElement
Forum Commoner
Posts: 86
Joined: Wed Oct 17, 2007 6:03 pm

Post by FireElement »

devendra-m wrote:
But I will ini_set('default_charset', 'UTF-8');
It did not work....
FireElement
Forum Commoner
Posts: 86
Joined: Wed Oct 17, 2007 6:03 pm

Post by FireElement »

I worked out that using htmlenterties() gets all symbols notmal £ $ yan one but not this one.... ( € ) its euro.

Not sure why?
FireElement
Forum Commoner
Posts: 86
Joined: Wed Oct 17, 2007 6:03 pm

Post by FireElement »

anyone know how to decode to ISO-8859-1
FireElement
Forum Commoner
Posts: 86
Joined: Wed Oct 17, 2007 6:03 pm

Post by FireElement »

Its fine I just put all the symbols in html so it just calls the enterty!

Thanks For your help tho!
Post Reply