You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Bob Archer <Bo...@amsi.com> on 2011/05/09 20:49:18 UTC

Adding Unicode files erroneously applies application/octet mime type

It seems when I "svn add" unicode (UCS-2 Little Endian, I think it is) files svn applies the svn:mime-type of application/octet to the files.

I found this in the archives:

http://svn.haxx.se/dev/archive-2004-03/0173.shtml

However the thread seems to come to no conclusion.

My question is, if I remove the property and just commit the file... are diff and merge operations going to work fine? Or, should I switch to plain ascii encoding?

I'm using Windows 7 64-bit. I'm not sure that makes a difference there though.

BOb
 

RE: Adding Unicode files erroneously applies application/octet mime type

Posted by Bob Archer <Bo...@amsi.com>.
> On May 9, 2011, at 13:49, Bob Archer wrote:
> 
> > It seems when I "svn add" unicode (UCS-2 Little Endian, I think
> it is) files svn applies the svn:mime-type of application/octet to
> the files.
> 
> Correct.
> 
> http://subversion.tigris.org/issues/show_bug.cgi?id=2194
> 
> 
> > My question is, if I remove the property and just commit the
> file... are diff and merge operations going to work fine?
> 
> I highly doubt it.
> 
> > Or, should I switch to plain ascii encoding?
> 
> If your files can be represented in ASCII, by all means do that. If
> you need non-ASCII characters, consider using UTF-8 instead of UTF-
> 16.
> 

Ok, I will just stick with ASCII for now. I don't think we need non-ascii characters for our SQL scripts at this point. It is just that our SQL scripting tool defaults to Unicode. We have just been removing the mime-type, but I will tell them to switch to outputting ASCII. Also, I'm not sure what SQL Management Studio's default is. I see a way to specify on saving a script but not on scripting to file.

thanks,
BOb


Re: Adding Unicode files erroneously applies application/octet mime type

Posted by Ryan Schmidt <su...@ryandesign.com>.
On May 9, 2011, at 13:49, Bob Archer wrote:

> It seems when I "svn add" unicode (UCS-2 Little Endian, I think it is) files svn applies the svn:mime-type of application/octet to the files.

Correct.

http://subversion.tigris.org/issues/show_bug.cgi?id=2194


> My question is, if I remove the property and just commit the file... are diff and merge operations going to work fine?

I highly doubt it.

> Or, should I switch to plain ascii encoding?

If your files can be represented in ASCII, by all means do that. If you need non-ASCII characters, consider using UTF-8 instead of UTF-16.



Re: Adding Unicode files erroneously applies application/octet mime type

Posted by Johan Corveleyn <jc...@gmail.com>.
On Mon, May 9, 2011 at 8:49 PM, Bob Archer <Bo...@amsi.com> wrote:
> It seems when I "svn add" unicode (UCS-2 Little Endian, I think it is) files svn applies the svn:mime-type of application/octet to the files.
>
> I found this in the archives:
>
> http://svn.haxx.se/dev/archive-2004-03/0173.shtml
>
> However the thread seems to come to no conclusion.
>
> My question is, if I remove the property and just commit the file... are diff and merge operations going to work fine? Or, should I switch to plain ascii encoding?

You'll be able to *execute* them, but I'm not sure if they will work
fine. I think it mainly depends on whether or not your encoding uses
line-endings that are compatible with ascii (\r, \n). The diff
implementation in svn (which is at the heart of the "diff", "merge"
and "blame" commands) depends on being able to split lines with \r or
\n.

Cheers,
-- 
Johan