Special character in php

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
indiavitus
Forum Newbie
Posts: 5
Joined: Wed Sep 01, 2010 5:23 am

Special character in php

Post by indiavitus »

Hi,

I have a string "Genérica", but while reading in php code, it get converted into "GenΘrica".

How can i get the same string i.e. "Genérica".

Please help me out.

Thanks,
Manoj
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: Special character in php

Post by McInfo »

Use the correct character set.
indiavitus
Forum Newbie
Posts: 5
Joined: Wed Sep 01, 2010 5:23 am

Re: Special character in php

Post by indiavitus »

what do you mean by that.
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: Special character in php

Post by McInfo »

The cause of this problem is usually that you are trying to decode (read) a string using a different character set than the one it was encoded in.
User avatar
DigitalMind
Forum Contributor
Posts: 152
Joined: Mon Sep 27, 2010 2:27 am
Location: Ukraine, Kharkov

Re: Special character in php

Post by DigitalMind »

use unicode
User avatar
Apollo
Forum Regular
Posts: 794
Joined: Wed Apr 30, 2008 2:34 am

Re: Special character in php

Post by Apollo »

indiavitus wrote:I have a string "Genérica",
In what encoding do you have this string?
Post Reply