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

Re: problems with checking a text file: svn thinks that it is a binary

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Sat, 20 Sep 2008 22:04:23 +0300 (Jerusalem Daylight Time)

steveking wrote on Sat, 20 Sep 2008 at 20:48 +0200:
> Karl Fogel wrote:
> > "baz themail" <bazthemail_at_gmail.com> writes:
> >> When adding a new dos text file with extension ".txt", svn thinks that it is a
> >> binary. Is there anyway to configure that? Is it mime-type related?
> >
> > 'svn propset svn:mime-type text/plain yourfile.txt'
>
> Be careful with that. A text file can be encoded in utf-16 (unicode),
> and Subversion can't handle that as text.
                 ^^^^^^^^^^^^^^^^^^^^^^^^^

A quick test shows that 'svn diff' doesn't blow up on a UTF-16 file, so
I'm not sure what you mean by "can't handle as text". Could you give an
example?

Thanks,

Daniel

> If your file is unicode, then
> you have to live with the fact that Subversion treats it as binary.
> And then don't set the svn:mime-type property to text/plain!
>
> Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-20 21:04:47 CEST

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

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