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
Character set issue? Character renders funny
Moderator: General Moderators
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Character set issue? Character renders funny
You need to set the character set to the correct encoding for the mysql client (PHP in this case). Use..
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.
Code: Select all
mysql_query("SET NAMES utf8", $databaseLink);-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Character set issue? Character renders funny
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...
However when I added the following line to the .htaccess file everything worked fine:
Code: Select all
AddDefaultCharset iso-8859-1It works but it's annoying...not sure whats going on...
-
l.francis30
- Forum Newbie
- Posts: 12
- Joined: Tue May 19, 2009 11:27 am
Re: Character set issue? Character renders funny
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 OSPCSpectra 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...Code: Select all
AddDefaultCharset iso-8859-1![]()
It works but it's annoying...not sure whats going on...