[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Fun with svn:mime-type

From: Branko Čibej <brane_at_xbc.nu>
Date: 2002-08-07 21:59:43 CEST

So I'm setting up a SVN repository at work, to serve up Web pages for a
set of projects. The first thing I do, of course, is write up a set of
wirking instructions for using Subversion (and the first commandment is
"read the Handbook" :-). I add that file to the repository, set
svn:mime-type to text/html, and look at it with my browser ...

Here's where it gets interesting. I encoded that document in UTF-8, and
put the appropriate <meta http-equiv="Content-Type" ...> tag in the
header. But the browser decided it's ISO-8859-1 anyway, showing a lot of
gunk where the interesting characters should have been. After a lot of
swearing and pawing through the mod_dav_svn code, I decided on a radical
approach: I changed the svn:mime-type property to "text/html;
charset=UTF-8".

And guess what? It worked just fine!

Now I have two questions:

    * Why would the browser ignore the <meta> tag? I thought it was
      supposed to override whatver the HTTP Content-Type header contains...

    * Is just adding the encoding to svn:mime-type the correct slution,
      or should I use it only as a temporary hack? Should we introduce a
      svn:encoding property instead?

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Aug 7 22:00:23 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.