You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Henrik Sundberg <st...@gmail.com> on 2008/03/22 10:44:26 UTC

Unicode, auto-props and eol-style

Hi,

I have just migrated a large repository from SourceSafe (vss) to Subversion.
auto-props for *.txt is set to svn:mime-type=text/plain;svn:eol-style=native

When checking the migration (i used vss2svn) i found some txt files
that in vss was stored as Little endian unicode (16-bit), DOS (the bom
is fffe) got changed line endings.

A file just containing a line with an A is changed like this (looking
at emacs hexl-mode on windows xp):
vss: fffe 4100 0d00 0a00
svn: fffe 4100 0d0a 000d 0a00

How should auto-props be defined for .txt-files when there are
different encodings in different files?
Should i remove the mime-type and keep the eol-style?
Is it possible to use the eol-style, when mixing unicode files with
ASCII files (I need the files in both Linux and Windows)?

I read about eol-style in
http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html#svn.advanced.props.special.eol-style
Does this mean that the file is changed before it is committed into
the repository? Is there a way to retrieve the files as they where
before the commit? By removing/changing properties?

/$

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Unicode, auto-props and eol-style

Posted by Henrik Sundberg <st...@gmail.com>.
2008/3/22, Ryan Schmidt <su...@ryandesign.com>:
> On Mar 22, 2008, at 05:44, Henrik Sundberg wrote:
>
>  > I have just migrated a large repository from SourceSafe (vss) to
>  > Subversion.
>  > auto-props for *.txt is set to svn:mime-type=text/plain;svn:eol-
>  > style=native
>  >
>  > When checking the migration (i used vss2svn) i found some txt files
>  > that in vss was stored as Little endian unicode (16-bit), DOS (the bom
>  > is fffe) got changed line endings.
>  >
>  > A file just containing a line with an A is changed like this (looking
>  > at emacs hexl-mode on windows xp):
>  > vss: fffe 4100 0d00 0a00
>  > svn: fffe 4100 0d0a 000d 0a00
>  >
>  > How should auto-props be defined for .txt-files when there are
>  > different encodings in different files?
>  > Should i remove the mime-type and keep the eol-style?
>  > Is it possible to use the eol-style, when mixing unicode files with
>  > ASCII files (I need the files in both Linux and Windows)?
>
>
> Subversion does not treat (non-UTF-8) Unicode files as text files.
>  For example, diffs won't work, blame won't work, etc. I've never
>  tried it but it sounds like you should not set svn:eol-style on these
>  files.
>
>
>  > I read about eol-style in
>  > http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-
>  > portability.html#svn.advanced.props.special.eol-style
>  > Does this mean that the file is changed before it is committed into
>  > the repository?
>
>
> Yes, the client changes the files before sending them to the repository.
>
>
>  > Is there a way to retrieve the files as they where before the
>  > commit? By removing/changing properties?
>
>
> No, the original file is not available anywhere in the repository.

Thanks for the response!

Does this indicate that I should remove eol-style and text/plain from
the config file when migrating vss repositories? And leave the
property settings to the users?

Is there a best practice for this?

/$

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Unicode, auto-props and eol-style

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 22, 2008, at 05:44, Henrik Sundberg wrote:

> I have just migrated a large repository from SourceSafe (vss) to  
> Subversion.
> auto-props for *.txt is set to svn:mime-type=text/plain;svn:eol- 
> style=native
>
> When checking the migration (i used vss2svn) i found some txt files
> that in vss was stored as Little endian unicode (16-bit), DOS (the bom
> is fffe) got changed line endings.
>
> A file just containing a line with an A is changed like this (looking
> at emacs hexl-mode on windows xp):
> vss: fffe 4100 0d00 0a00
> svn: fffe 4100 0d0a 000d 0a00
>
> How should auto-props be defined for .txt-files when there are
> different encodings in different files?
> Should i remove the mime-type and keep the eol-style?
> Is it possible to use the eol-style, when mixing unicode files with
> ASCII files (I need the files in both Linux and Windows)?

Subversion does not treat (non-UTF-8) Unicode files as text files.  
For example, diffs won't work, blame won't work, etc. I've never  
tried it but it sounds like you should not set svn:eol-style on these  
files.

> I read about eol-style in
> http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file- 
> portability.html#svn.advanced.props.special.eol-style
> Does this mean that the file is changed before it is committed into
> the repository?

Yes, the client changes the files before sending them to the repository.

> Is there a way to retrieve the files as they where before the  
> commit? By removing/changing properties?

No, the original file is not available anywhere in the repository.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org