Character Encoding and PhP
Posted 03 June 2006 - 07:33 PM
I have put the line AddDefaultCharset ISO-8859-1 in my .htaccess file as this makes all my page using the correct encoding. My pages are in french so I need é à ù etc. All my html files are ok.
But all my .php files are not.
Their is two examples where i write ééé ààà êê ù etc. in html and in php I echo ééé ààà êê ù etc.
[a href=\"http://beadventure.ca/test/char/index.html\" target=\"_blank\"]The correct webpage in html[/a]
[a href=\"http://beadventure.ca/test/char/index.php\" target=\"_blank\"]The NON-correct webpage in php[/a]
I think its in the configuration of php. I'll need to contact my web host but I don't know what to say. And perhaps their is way without the need to contact them.
I'm pretty sure that I can change something on my side (like a line of code or something) because I host a phpBB forum on this website (where phpBB forum is in php... lol =) ) and the é à ù are correctly rendered.
I know that I can go in my internet otions and change the encoding by myself, but it's not very nice to do... =(
I would like some help on this, thank you for your time everyone.
Posted 04 June 2006 - 08:09 PM
Posted 04 June 2006 - 08:38 PM
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <html lang="fr"> <title>blank page</title> </head> <body> ééé ààà êê ù etc. </body> </html>Note the language definition
Posted 23 September 2006 - 02:37 PM
Perhaps their is something missing on my server configuration.
However doing the following will ALWAYS work (for me...) (adding the header() at the top)
<?php // Default content type (allow àéîö...) header("Content-Type: text/html; charset=ISO-8859-1"); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <html lang="fr"> <title>blank page</title> </head> <body> ééé ààà êê ù etc. </body> </html>
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users