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
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 ?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.