Jump to content

Server encoding problem ?


Dino29

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/254082-server-encoding-problem/
Share on other sites

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 ?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.