On Sun, Feb 03, 2013 at 07:42:42AM -0500, Justin Erenkrantz wrote: > On Sun, Feb 3, 2013 at 6:42 AM, Stefan Sperling <s...@elego.de> wrote: > > Perhaps we should treat mime-types that contain 'charset=UTF-8' > > as text by default? libmagic is able to detect the charset AFAIK. > > Our code currently removes charset information from the mime-type > > returned by libmagic. > > > > I don't really like the idea of adding yet another special case > > to our definition of what a "text" mime-type is. But it might > > be worth doing this if it impacts a lot of people. > > > > % file -i -k index.shtml > index.shtml: application/xml; charset=us-ascii > > Not all of us use UTF-8, but yes the sentiment is valid. =) I do wonder > if printing out this new message saying SVN considers XML files as binary > is going to increase the amount of people realizing that they are tripping > over this. -- justin
The new warning isn't printed when the mime-type is set by libmagic. It's only printed during propset/propedit. It only targets people who set a binary mime-type via propset/propedit. To raise greater awareness the code could be moved into the subversion library and send a special notification to alert users whenever a property is set on a file in the working copy, even during 'svn add'. But I don't think that adds much value over the existing '(bin)' notification.