Dino29 Posted December 30, 2011 Share Posted December 30, 2011 Hey I have 2 hosting provider and the same files aren't rendered the same way on both, I'm trying to figure out why. For exemple, if I upload that same simple file on both servers : <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> </head> <?php echo "aéaa"; ?> The first server will display "aéaa" correctly while the second will display a�aa (� is actually a white square). The php file is encoded in UTF-8 (with BOM) in both case. I tried "ini_set('default_charset', 'utf-8');" and also adding "AddDefaultCharset utf-8" to httpd.conf, but it didnt change anything. It works on both servers when I encode the file in UTF-8 without BOM, but I'm installing a lot of premade scripts and I'd rather have the new server work like the old one rather than reencoding every file I download. Any ideas ? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/254082-server-encoding-problem/ Share on other sites More sharing options...
Muddy_Funster Posted December 30, 2011 Share Posted December 30, 2011 run a page with <?php phpinfo(); ?> on it and check what the HTTP_ACCEPT_CHARSET value is for the server envyronment. Quote Link to comment https://forums.phpfreaks.com/topic/254082-server-encoding-problem/#findComment-1302554 Share on other sites More sharing options...
Dino29 Posted December 30, 2011 Author Share Posted December 30, 2011 On server 1 (display é correctly), phpinfo() doesn't show any environment variable for some reason. :s On server 2, I have : HTTP_ACCEPT image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-xpsdocument, */* HTTP_ACCEPT_ENCODING gzip, deflate HTTP_ACCEPT_LANGUAGE fr-FR but no HTTP_ACCEPT_CHARSET. Any other way to check ? Quote Link to comment https://forums.phpfreaks.com/topic/254082-server-encoding-problem/#findComment-1302596 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.