Mailing List Archive

Unicode Chars not working
Hi,
I am moving my site from one server to another, both are apache 2. The files where tarred and zipped on one linux server and copied to another linux server.

On the new server, any pages with a Unicode character is getting served with the black diamond and question mark.

I enabled AddDefaultCharset UTF-8 on the new server it does not make a difference.

What else do I need to change?
Re: Unicode Chars not working [ In reply to ]
On Sat, Nov 11, 2023 at 6:49?PM Chris me <phunction@hotmail.com> wrote:

> Hi,
>
> I am moving my site from one server to another, both are apache 2. The
> files where tarred and zipped on one linux server and copied to another
> linux server.
>
>
>
> On the new server, any pages with a Unicode character is getting served
> with the black diamond and question mark.
>
>
>
> I enabled AddDefaultCharset UTF-8 on the new server it does not make a
> difference.
>
>
>
> What else do I need to change?
>

Are you sure your content is not producing html header with the wrong
charset? I would inspect it.
Re: Unicode Chars not working [ In reply to ]
Seeing how it's an exact copy from the other server and the other server is fine I would think that's more of a Apache configuration isn't it?The content itself does not specify a character set.Sent from my Galaxy
-------- Original message --------From: Frank Gingras <thumbs@apache.org> Date: 2023-11-11 4:02 p.m. (GMT-08:00) To: users@httpd.apache.org Subject: Re: [users@httpd] Unicode Chars not working On Sat, Nov 11, 2023 at 6:49?PM Chris me <phunction@hotmail.com> wrote:










Hi,
I am moving my site from one server to another, both are apache 2. The files where tarred and zipped on one linux server and copied to another linux server.
 
On the new server, any pages with a Unicode character is getting served with the black diamond and question mark.
 
I enabled AddDefaultCharset UTF-8 on the new server it does not make a difference.
 
What else do I need to change?Are you sure your content is not producing html header with the wrong charset? I would inspect it. 
Re: Unicode Chars not working [ In reply to ]
On Sat, Nov 11, 2023 at 8:31?PM phunction <phunction@hotmail.com> wrote:

> Seeing how it's an exact copy from the other server and the other server
> is fine I would think that's more of a Apache configuration isn't it?
>
> The content itself does not specify a character set.
>
>
>
> Sent from my Galaxy
>
>
> -------- Original message --------
> From: Frank Gingras <thumbs@apache.org>
> Date: 2023-11-11 4:02 p.m. (GMT-08:00)
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Unicode Chars not working
>
>
>
> On Sat, Nov 11, 2023 at 6:49?PM Chris me <phunction@hotmail.com> wrote:
>
>> Hi,
>>
>> I am moving my site from one server to another, both are apache 2. The
>> files where tarred and zipped on one linux server and copied to another
>> linux server.
>>
>>
>>
>> On the new server, any pages with a Unicode character is getting served
>> with the black diamond and question mark.
>>
>>
>>
>> I enabled AddDefaultCharset UTF-8 on the new server it does not make a
>> difference.
>>
>>
>>
>> What else do I need to change?
>>
>
> Are you sure your content is not producing html header with the wrong
> charset? I would inspect it.
>

Try to inspect the response headers with your browser (F12) next.
RE: Unicode Chars not working [ In reply to ]
Yes, the headers are the same on both, there is no header directive to set character set, as I have stated.
IE, there is nothing like <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> in the header.

There has to be something different in the 2 apache servers, the one that works is an older 2.4.4 and the new one is 2.4.57 that is not working right.

Still can’t figure out what is causing the difference.

From: Frank Gingras <thumbs@apache.org>
Sent: Saturday, November 11, 2023 5:44 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Unicode Chars not working



On Sat, Nov 11, 2023 at 8:31?PM phunction <phunction@hotmail.com<mailto:phunction@hotmail.com>> wrote:
Seeing how it's an exact copy from the other server and the other server is fine I would think that's more of a Apache configuration isn't it?

The content itself does not specify a character set.



Sent from my Galaxy


-------- Original message --------
From: Frank Gingras <thumbs@apache.org<mailto:thumbs@apache.org>>
Date: 2023-11-11 4:02 p.m. (GMT-08:00)
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] Unicode Chars not working



On Sat, Nov 11, 2023 at 6:49?PM Chris me <phunction@hotmail.com<mailto:phunction@hotmail.com>> wrote:
Hi,
I am moving my site from one server to another, both are apache 2. The files where tarred and zipped on one linux server and copied to another linux server.

On the new server, any pages with a Unicode character is getting served with the black diamond and question mark.

I enabled AddDefaultCharset UTF-8 on the new server it does not make a difference.

What else do I need to change?

Are you sure your content is not producing html header with the wrong charset? I would inspect it.

Try to inspect the response headers with your browser (F12) next.
Re: Unicode Chars not working [ In reply to ]
Please see below, I do not top post.

On 2023-11-12 17:09, Chris me wrote:
> Yes, the headers are the same on both, there is no header directive to
> set character set, as I have stated.
>
> IE, there is nothing like <meta http-equiv="Content-Type"
> content="text/html; charset=iso-8859-1" /> in the header.
>
> There has to be something different in the 2 apache servers, the one
> that works is an older 2.4.4 and the new one is 2.4.57 that is not
> working right.
>
> Still can’t figure out what is causing the difference.
>
> *From:* Frank Gingras <thumbs@apache.org>
> *Sent:* Saturday, November 11, 2023 5:44 PM
> *To:* users@httpd.apache.org
> *Subject:* Re: [users@httpd] Unicode Chars not working
>
> On Sat, Nov 11, 2023 at 8:31?PM phunction <phunction@hotmail.com
> <mailto:phunction@hotmail.com>> wrote:
>
> Seeing how it's an exact copy from the other server and the other
> server is fine I would think that's more of a Apache configuration
> isn't it?
>
> The content itself does not specify a character set.
>
> Sent from my Galaxy
>
> -------- Original message --------
>
> From: Frank Gingras <thumbs@apache.org <mailto:thumbs@apache.org>>
>
> Date: 2023-11-11 4:02 p.m. (GMT-08:00)
>
> To: users@httpd.apache.org <mailto:users@httpd.apache.org>
>
> Subject: Re: [users@httpd] Unicode Chars not working
>
> On Sat, Nov 11, 2023 at 6:49?PM Chris me <phunction@hotmail.com
> <mailto:phunction@hotmail.com>> wrote:
>
> Hi,
>
> I am moving my site from one server to another, both are apache
> 2. The files where tarred and zipped on one linux server and
> copied to another linux server.
>
> On the new server, any pages with a Unicode character is getting
> served with the black diamond and question mark.
>
> I enabled AddDefaultCharset UTF-8 on the new server it does not
> make a difference.
>
> What else do I need to change?
>
> Are you sure your content is not producing html header with the
> wrong charset? I would inspect it.
>
> Try to inspect the response headers with your browser (F12) next.
>

Latest W3 strongly suggests (even will give an error if missing) having
a <meta http-equiv="Content-Type" content="text/html; charset=utf-8">.
Have you tried this on your original website? This should confirm that
you have no charset errors.

You could also try # rsync -avz from the original to a clean directory
on the new server, rather than tar zip. If the original was utf-8 and
not some variant, it should copy faithfully.

I can confirm that utf-8 from 2.4.4 to 2.4.52 (note, not 57) works
perfectly.

Paul



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: Unicode Chars not working [ In reply to ]
I rechecked the response headers, interesting thing is the server that works is just sending content-type: text/thml

but the one that does not work is sending content-type: text/html and charset=UTF-8
even though it is sending the charset after I un-commented it in charset.conf.

So why does the old server work properly even though it does not explicitly set the charset, but the new server does not, even when it is set?

Is it the linux system itself that might be serving the file to apache weird?

One thing I did notice in the headers, is the old server has
transfer-encoding: chunked
but the new server does not have that, it has
Vary: accept-encoding



From: phunction <phunction@hotmail.com>
Sent: Saturday, November 11, 2023 4:14 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Unicode Chars not working

Seeing how it's an exact copy from the other server and the other server is fine I would think that's more of a Apache configuration isn't it?

The content itself does not specify a character set.



Sent from my Galaxy


-------- Original message --------
From: Frank Gingras <thumbs@apache.org<mailto:thumbs@apache.org>>
Date: 2023-11-11 4:02 p.m. (GMT-08:00)
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] Unicode Chars not working



On Sat, Nov 11, 2023 at 6:49?PM Chris me <phunction@hotmail.com<mailto:phunction@hotmail.com>> wrote:
Hi,
I am moving my site from one server to another, both are apache 2. The files where tarred and zipped on one linux server and copied to another linux server.

On the new server, any pages with a Unicode character is getting served with the black diamond and question mark.

I enabled AddDefaultCharset UTF-8 on the new server it does not make a difference.

What else do I need to change?

Are you sure your content is not producing html header with the wrong charset? I would inspect it.
Re: Unicode Chars not working [ In reply to ]
On 2023-11-13 22:17, Chris me wrote:
> I rechecked the response headers, interesting thing is the server that
> works is just sending content-type: text/thml
>
> but the one that does not work is sending  content-type: text/html and
> charset=UTF-8
>
> even though it is sending the charset after I un-commented it in
> charset.conf.
>
> So why does the old server work properly even though it does not
> explicitly set the charset, but the new server does not, even when it is
> set?
>
> Is it the linux system itself that might be serving the file to apache
> weird?

[off-apache-topic] To eliminate all charset | meta | newer browser
compliance | whatever questions and solve them later, why not manually
just get rid of all non-utf-8 content? It's trivial to find them using
e.g.:
grep -axv '.*' *.html
Mix and match to your directory content. Note this assumes your
'locale' is utf-8
Paul


>
> One thing I did notice in the headers, is the old server has
>
> transfer-encoding: chunked
>
> but the new server does not have that, it has
>
> Vary: accept-encoding
>
> *From:* phunction <phunction@hotmail.com>
> *Sent:* Saturday, November 11, 2023 4:14 PM
> *To:* users@httpd.apache.org
> *Subject:* Re: [users@httpd] Unicode Chars not working
>
> Seeing how it's an exact copy from the other server and the other server
> is fine I would think that's more of a Apache configuration isn't it?
>
> The content itself does not specify a character set.
>
> Sent from my Galaxy
>
> -------- Original message --------
>
> From: Frank Gingras <thumbs@apache.org <mailto:thumbs@apache.org>>
>
> Date: 2023-11-11 4:02 p.m. (GMT-08:00)
>
> To: users@httpd.apache.org <mailto:users@httpd.apache.org>
>
> Subject: Re: [users@httpd] Unicode Chars not working
>
> On Sat, Nov 11, 2023 at 6:49?PM Chris me <phunction@hotmail.com
> <mailto:phunction@hotmail.com>> wrote:
>
> Hi,
>
> I am moving my site from one server to another, both are apache 2.
> The files where tarred and zipped on one linux server and copied to
> another linux server.
>
> On the new server, any pages with a Unicode character is getting
> served with the black diamond and question mark.
>
> I enabled AddDefaultCharset UTF-8 on the new server it does not make
> a difference.
>
> What else do I need to change?
>
> Are you sure your content is not producing html header with the wrong
> charset? I would inspect it.
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org