You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by peter pilsl <pi...@goldfisch.at> on 2004/12/07 23:41:04 UTC
[users@httpd] fail to serve static unicode-file proper
I deal a lot with unicode/utf8. Usually I generate the content
dynamically and just print out a Content-Type-line including a
charset-command as Header and everything is fine.
Now I want to present a static utf-8 page and I fail.
My first attempt was to add an appropriate meta-tag to the source:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
When this did not work I inspected my config and found:
AddLanguage de .de
AddCharset UTF-8 .utf8
So I renamed my text.html into text.de.utf8 and .. again my browser
(Firefox 1.0) showed the page using the iso-8859-1-charset.
So finally I tried the AddDefaultChard utf8 in the .htaccess for the
folder where my text was in, only to get an error and the error-log
stated that
/data/apache/myfolder/.htaccess: AddDefaultCharset not allowed here
whoops? Next step is to write a small cgi that reads the text and print
an appropriate header. But I'm sure there is a way to present static
unicode-text.
thnx,
peter
--
mag. peter pilsl
goldfisch.at
IT-management
tel +43 699 1 3574035
fax +43 699 4 3574035
pilsl@goldfisch.at
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] fail to serve static unicode-file proper
Posted by Ralf Glauberman <rg...@michaeli-gymnasium.de>.
i just found it, try not to add a charset-header at all by setting
AddDefaultCharset Off
then the meta will be interpreted
----- Original Message -----
From: "Ralf Glauberman" <rg...@michaeli-gymnasium.de>
To: <us...@httpd.apache.org>
Sent: Tuesday, December 07, 2004 11:50 PM
Subject: Re: [users@httpd] fail to serve static unicode-file proper
> try the AddDefaultCharset in the global server-config, just for a test. i
> once read that <meta http-equiv="Content-Type" content="text/html;
> charset=UTF-8"> is only interpreted if the server doesn't send a
> charset-header, so it could be worth a try to leave the AddDefaultCharset
> out comletely and put the meta in your file.
>
> ----- Original Message -----
> From: "peter pilsl" <pi...@goldfisch.at>
> To: "apache" <us...@httpd.apache.org>
> Sent: Tuesday, December 07, 2004 11:41 PM
> Subject: [users@httpd] fail to serve static unicode-file proper
>
>
>>
>> I deal a lot with unicode/utf8. Usually I generate the content
>> dynamically and just print out a Content-Type-line including a
>> charset-command as Header and everything is fine.
>>
>> Now I want to present a static utf-8 page and I fail.
>>
>> My first attempt was to add an appropriate meta-tag to the source:
>>
>> <head>
>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>> </head>
>>
>> When this did not work I inspected my config and found:
>>
>> AddLanguage de .de
>> AddCharset UTF-8 .utf8
>>
>> So I renamed my text.html into text.de.utf8 and .. again my browser
>> (Firefox 1.0) showed the page using the iso-8859-1-charset.
>>
>> So finally I tried the AddDefaultChard utf8 in the .htaccess for the
>> folder where my text was in, only to get an error and the error-log
>> stated that
>> /data/apache/myfolder/.htaccess: AddDefaultCharset not allowed here
>>
>>
>> whoops? Next step is to write a small cgi that reads the text and print
>> an appropriate header. But I'm sure there is a way to present static
>> unicode-text.
>>
>> thnx,
>> peter
>>
>>
>>
>>
>>
>> --
>> mag. peter pilsl
>> goldfisch.at
>> IT-management
>> tel +43 699 1 3574035
>> fax +43 699 4 3574035
>> pilsl@goldfisch.at
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server
>> Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> " from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] fail to serve static unicode-file proper
Posted by Ralf Glauberman <rg...@michaeli-gymnasium.de>.
try the AddDefaultCharset in the global server-config, just for a test. i
once read that <meta http-equiv="Content-Type" content="text/html;
charset=UTF-8"> is only interpreted if the server doesn't send a
charset-header, so it could be worth a try to leave the AddDefaultCharset
out comletely and put the meta in your file.
----- Original Message -----
From: "peter pilsl" <pi...@goldfisch.at>
To: "apache" <us...@httpd.apache.org>
Sent: Tuesday, December 07, 2004 11:41 PM
Subject: [users@httpd] fail to serve static unicode-file proper
>
> I deal a lot with unicode/utf8. Usually I generate the content dynamically
> and just print out a Content-Type-line including a charset-command as
> Header and everything is fine.
>
> Now I want to present a static utf-8 page and I fail.
>
> My first attempt was to add an appropriate meta-tag to the source:
>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
> </head>
>
> When this did not work I inspected my config and found:
>
> AddLanguage de .de
> AddCharset UTF-8 .utf8
>
> So I renamed my text.html into text.de.utf8 and .. again my browser
> (Firefox 1.0) showed the page using the iso-8859-1-charset.
>
> So finally I tried the AddDefaultChard utf8 in the .htaccess for the
> folder where my text was in, only to get an error and the error-log stated
> that
> /data/apache/myfolder/.htaccess: AddDefaultCharset not allowed here
>
>
> whoops? Next step is to write a small cgi that reads the text and print an
> appropriate header. But I'm sure there is a way to present static
> unicode-text.
>
> thnx,
> peter
>
>
>
>
>
> --
> mag. peter pilsl
> goldfisch.at
> IT-management
> tel +43 699 1 3574035
> fax +43 699 4 3574035
> pilsl@goldfisch.at
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org