W3C home > Mailing lists > Public > www-international@w3.org > April to June 2004

RE: New FAQ for review: Setting charset information in .htaccess

From: Richard Ishida <ishida@w3.org>
Date: Thu, 17 Jun 2004 23:43:45 +0100
To: "'Bjoern Hoehrmann'" <derhoermi@gmx.net>
Cc: <www-international@w3.org>
Message-Id: <20040617224344.88BD24EF95@homer.w3.org>

Thanks for these comments, Bjoern.  


============
Richard Ishida
W3C

contact info:
http://www.w3.org/People/Ishida/ 

W3C Internationalization:
http://www.w3.org/International/ 
 
 

> -----Original Message-----
> From: Bjoern Hoehrmann [mailto:derhoermi@gmx.net] 
> Sent: 17 June 2004 22:18
> To: Richard Ishida
> Cc: www-international@w3.org
> Subject: Re: New FAQ for review: Setting charset information 
> in .htaccess
> 
> * Richard Ishida wrote:
> >Here is a first draft of a new FAQ, answering the question:
> >
> >> How do I use .htaccess directives on an Apache server to 
> serve files with a specific encoding?
> >http://www.w3.org/International/questions/qa-htaccess-charset.html
> >
> >Please send comments to help me produce a final draft.  Thanks.
> 
> There are two things readers should be aware of before going 
> into the details of the answer, whether they want to do this 
> at all and if they want to do it, which encoding should be 
> specified. The former is pointed out after the answer, so you 
> read the entire answer just to read something else that tells 
> you do not do that which is rather unfortunate. Is there a 
> document that explains how to figure out what the encoding of 
> existing documents might be? If so, it should along with the 
> document that explains whether this should be done at all be 
> linked from the top, suggested prior reading, or something.

Mmm. We try to get stuck in and answer the question as quickly and
succinctly as possible in these things, without requiring the reader to wade
through too much.  This was why we put the background further down (though
providing a link for those who don't understand the issue).  I'll look at
this again, though and see what I can do.



> 
> There should be means to interactively figure out what the 
> server currently declares, e.g. by including the form from
> 
>   http://cgi.w3.org/cgi-bin/headers
> 
> and
> 
>   http://www.w3.org/International/questions/qa-headers-charset.html
> 
> should be linked directly from the "Background" section.

Yes.  I'll consider that.


> 
> It seems you confuse <Files ...> and <Files ~ ...>, the 
> latter expects a regular expression and is thus equivalent to 
> FilesMatch, which is
> 
> [...]
>   In Apache 1.3 and later, <FilesMatch> is preferred, however.
> [...]
> 
> The example
> 
> [...]
>   <Files ~ "example\.html">
>   AddCharset UTF-8 .html
>   </Files>
> [...]
> 
> Would match all file names that contain the substring 
> "example.html", e.g. "myexample.html" or 
> "my-example.html.old.xhtml.utf16", it seems you rather want to use
> 
>   <Files "example.html">
>   AddCharset UTF-8 .html
>   </Files>
> 
> Or
> 
>   <Files ~ "^example\.html$">
>   AddCharset UTF-8 .html
>   </Files>
> 
> which should rather be
> 
>   <FilesMatch "^example\.html$">
>   AddCharset UTF-8 .html
>   </Files>


Thanks for pointing this out.  I'll fix it.


> 
> The first occurence of the various directives should be links 
> to the Apache server manual. It would also be good to stress 
> to which server software packages this applies (Apache is not 
> the only .htaccess aware server), how to figure out which 
> server software is used for the users web site (HTTP header, 
> Netcraft, ...) and that .htaccess is an optional feature, it 
> requires that the server administrator or the web hosting 
> provider allows AllowOverride +FileInfo which is not 
> available to every- one and whether it is named ".htaccess" 
> depends on the AccessFileName setting, which is also 
> sometimes changed for "security" reasons. 

Yes.  But I based the question on the specific question I am asked many
times, which is what directives to use in the .htaccess file.  Might be
worth adding some of this somewhere though.


> 
> Directing readers to check their manuals or contacting the 
> hosting provider in case of further questions or if anything 
> fails might be a good idea.

Thanks.

RI
> 
Received on Thursday, 17 June 2004 18:43:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 19:17:03 GMT