I up-to-date today my Apache on my small debian/Lenny towards the 2.2.9 version and for whatever reason the encoding isn't right any longer.

I personally use UTF-8 on my pages and lots of javascript to complete some ajax, I actually do that for that login for instance. This encoding problem ruin the javascript and make strange behavior around the front-end.

Here's a good example of what my after sales returns after i do my ajax calls : ���������������

(I think you'll might find the strange figures, those are the usual question mark and strange rectange with a few amounts inside them)

I attempted to pressure apache to come back UTF-8 encoding while using "AddDefaultCharset UTF-8" option. I did not change my code whatsoever.

Help me on that one, I'm not sure where you can look any longer.

Here's my apache2.conf

ServerRoot "/etc/apache2"
LockFile /var/lock/apache2/accept.lock
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15

<IfModule mpm_prefork_module>
StartServers          5
MinSpareServers       5
MaxSpareServers      10
MaxClients          150
MaxRequestsPerChild   0

<IfModule mpm_worker_module>
StartServers          2
MaxClients          150
MinSpareThreads      25
MaxSpareThreads      75 
ThreadsPerChild      25
MaxRequestsPerChild   0


AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all

DefaultType text/plain
HostnameLookups Off
ErrorLog /var/log/apache2/error.log
LogLevel warn

Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
Include /etc/apache2/httpd.conf
Include /etc/apache2/ports.conf

LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined

Include /etc/apache2/conf.d/
Include /etc/apache2/sites-enabled/

And my Vhost configuration

NameVirtualHost Myip
<VirtualHost *:80>
DocumentRoot /var/www/domain.com/public
ServerName domain.com
ServerAlias *.domain.com

ServerAdmin dev@domain.net

RequestHeader edit Host: ^([^.]+)\.my\.domain\.com my.domain.com early
RequestHeader edit Host: ^([^.]+)\.api\.domain\.com api.domain.com early
RequestHeader edit Host: ^([^.]+)\.partners\.domain\.com partners.domain.com early
RequestHeader edit Host: ^([^.]+)\.admin\.domain\.com admin.domain.com early

AddOutputFilterByType DEFLATE text/html text/plain text/xml

<Location />
# Insert filter
SetOutputFilter DEFLATE

# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png|swf)$ no-gzip dont-vary

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary

<Directory />
    Options FollowSymLinks
    AllowOverride All

<Directory /var/www/domain.com/public>
    Options FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule !\.(js|ico|gif|jpg|png|css)$ /index.php

ErrorLog /var/log/apache2/domain_error.log
CustomLog /var/log/apache2/domain_access.log combined

Appreciate your help and tell me if you want more details. I really hope we'll have the ability to resolve this issue.

I resolved my problem.

Really it had been the PHP version I had been by using their had an issue with the encoding. I uninstalled PHP and reinstalled it also it resolved my problem.

I had been using 5.2.6 and up-to-date to five.2.7

Hope that will help someone later on.