Page 1 of 1
Character set issue? Character renders funny
Posted: Thu May 21, 2009 7:58 am
by alex.barylski
I have a large database of Canadian businesses some of the names are french.
Example: 1003 Rue Du March�-Central
On my screen and in the TEXTAREA for writing this it appears March[]
Where [] is a little box -- when while in phpMyAdmin the character appears correct and is an accented 'e'
What am I, phpBB doing wrong and phpMyAdmin doing right? Do I have to set the character set using HTML or is it done using header() or something similar?
Is this even a character set issue?
Cheers,
Alex
Re: Character set issue? Character renders funny
Posted: Thu May 21, 2009 9:15 am
by onion2k
You need to set the character set to the correct encoding for the mysql client (PHP in this case). Use..
Code: Select all
mysql_query("SET NAMES utf8", $databaseLink);
Where the function is whatever you're using to execute queries, 'utf8' is the correct encoding, and $databaseLink is the db connection. You may also need to set the encoding of the page to the correct value too, either with a header() or a meta tag.
Re: Character set issue? Character renders funny
Posted: Thu May 21, 2009 10:31 am
by alex.barylski
Whats weird, is that it worked fine in Firefox, Opera, etc...just not IE7...
However when I added the following line to the .htaccess file everything worked fine:
When I specify utf-8 however those little blocks show up again...
It works but it's annoying...not sure whats going on...
Re: Character set issue? Character renders funny
Posted: Mon May 25, 2009 3:39 am
by l.francis30
PCSpectra wrote:Whats weird, is that it worked fine in Firefox, Opera, etc...just not IE7...
However when I added the following line to the .htaccess file everything worked fine:
When I specify utf-8 however those little blocks show up again...
It works but it's annoying...not sure whats going on...
This thing also happen to me before but i still can find a way to solve it until now.. It have connection with character set installed in windows? because IE is also microsoft product.. Maybe you don't have french character set in your windows OS