[SVN] snippets encoding

Sune Foldager cryo at cyanite.org
Wed Mar 2 14:59:44 UTC 2005


On 1. mar 2005, at 19:39, Kevin Ballard wrote:

> I agree. Personally, when I use UTF-8 in my web pages, I simply put a 
> meta tag declaring the page to be UTF-8 and then don't bother with 
> entities. The only entities that I bother using are &, ", and 
>  

Meta-tags are not always enough though... because the server also sends 
an encoding in the HTTP request, which takes precedence (and with 
Apache, this encoding is per default latin1).

With apache, one can (if allowed) use Options +MultiViews in .htaccess 
and then call the file .index.utf8 or similar. Alternatively, another 
.htaccess directive can set the default encoding to utf8:
AddDefaultCharset utf-8

Which sets it for mime-types text/html and text/plain. Or just for some 
extensions:
Addcharset utf-8 .foo .bar ...

For reasons only known to Apache, you can't set it for mime-types. See 
my mail on the main list for more details.

-- 
Sune.
:: the Cottage of Lost Play.
:: http://cyanite.org




More information about the textmate-dev mailing list