You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by David Aldrich <Da...@EU.NEC.COM> on 2010/10/14 08:29:50 UTC

UTF-16 files and inconsistent line endings

Hi

I am developing with Visual C++ Express 2008 on Windows. I needed to add some Japanese characters to a source file, whereupon the editor stored the file in UTF-16LE encoding. Subversion (1.6.12) now complains that the file has inconsistent EOL-style.

Does Subversion 1.6 support UTF-16LE encoding?

Is there a workaround for this, such as setting eol-style to CRLF (i.e. not native)? 

Best regards 

David 

RE: UTF-16 files and inconsistent line endings

Posted by Vojáček Aleš <av...@fblgroup.cz>.
Hi all,
Another problem with UTF, now it is problem when merging 2 files which are UTF8 (BOM) The file on local HDD is still UTF8, but the file from repository is ANSI :-()
IdFromKodGenerator.cs.merge-left.r43343 - ANSI but in trunk (from I'm doing merge is UTF-8)
IdFromKodGenerator.cs.merge-right.r43356 - branch into I'm merging is UTF-8.

Can you help me with that?
A.

-----Original Message-----
From: Ulrich Eckhardt [mailto:eckhardt@satorlaser.com]
Sent: Thursday, October 14, 2010 1:23 PM
To: users@subversion.apache.org
Subject: Re: UTF-16 files and inconsistent line endings

On Thursday 14 October 2010, David Aldrich wrote:
> I am developing with Visual C++ Express 2008 on Windows. I needed to add
> some Japanese characters to a source file, whereupon the editor stored the
> file in UTF-16LE encoding.

Subversion doesn't support UTF-16 as text file, it treats it as unknown (raw
binary) file...

> Subversion (1.6.12) now complains that the file has inconsistent EOL-style.

...and that doesn't mix well with this text-specific setting.

You could try using UTF-8 instead, though I'm not sure how to explain that to
MSVC, maybe just storing with a BOM is enough. MSVC allows saving as UTF-8
when choosing "save as" in the "save" button's drop-down list, notepad.exe
does that if you save as UTF-8, IIRC.


> Is there a workaround for this, such as setting eol-style to CRLF (i.e. not
> native)?

Simply deleting the svn:eol-style property would also silence the warning.

Uli


--
ML: http://subversion.apache.org/docs/community-guide/mailing-lists.html
FAQ: http://subversion.apache.org/faq.html
Docs: http://svnbook.red-bean.com/

Sator Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

**************************************************************************************
Sator Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
**************************************************************************************
           Visit our website at <http://www.satorlaser.de/>
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht verantwortlich.
**************************************************************************************

RE: UTF-16 files and inconsistent line endings

Posted by David Aldrich <Da...@EU.NEC.COM>.
Hi Ulrich and Stefan

Thanks for your replies. Using UTF-8 has solved the problem, as you suggested.

Best regards 

David 


> -----Original Message-----
> From: Ulrich Eckhardt [mailto:eckhardt@satorlaser.com]
> Sent: 14 October 2010 12:23
> To: users@subversion.apache.org
> Subject: Re: UTF-16 files and inconsistent line endings
> 
> On Thursday 14 October 2010, David Aldrich wrote:
> > I am developing with Visual C++ Express 2008 on Windows. I needed to add
> > some Japanese characters to a source file, whereupon the editor stored the
> > file in UTF-16LE encoding.
> 
> Subversion doesn't support UTF-16 as text file, it treats it as unknown (raw
> binary) file...
> 
> > Subversion (1.6.12) now complains that the file has inconsistent EOL-style.
> 
> ...and that doesn't mix well with this text-specific setting.
> 
> You could try using UTF-8 instead, though I'm not sure how to explain that to
> MSVC, maybe just storing with a BOM is enough. MSVC allows saving as UTF-8
> when choosing "save as" in the "save" button's drop-down list, notepad.exe
> does that if you save as UTF-8, IIRC.
> 
> 
> > Is there a workaround for this, such as setting eol-style to CRLF (i.e. not
> > native)?
> 
> Simply deleting the svn:eol-style property would also silence the warning.
> 
> Uli
> 
> 
> --
> ML: http://subversion.apache.org/docs/community-guide/mailing-lists.html
> FAQ: http://subversion.apache.org/faq.html
> Docs: http://svnbook.red-bean.com/
> 
> Sator Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
> Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
> 
> *****************************************************************************
> *********
> Sator Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
> Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
> *****************************************************************************
> *********
>            Visit our website at <http://www.satorlaser.de/>
> *****************************************************************************
> *********
> Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten
> bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen
> Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein
> sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen,
> weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
> E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte
> Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht
> verantwortlich.
> *****************************************************************************
> *********
> 
> 
> 
>  Click
> https://www.mailcontrol.com/sr/j7TZ4!efwiHTndxI!oX7Ug3O71j94L3XM4taKVk7xLgF5u
> 8fC7h07Llmcw5pzXf0QETRMEibH6EpdY6WjzZSeg==  to report this email as spam.

Re: UTF-16 files and inconsistent line endings

Posted by Ulrich Eckhardt <ec...@satorlaser.com>.
On Thursday 14 October 2010, David Aldrich wrote:
> I am developing with Visual C++ Express 2008 on Windows. I needed to add
> some Japanese characters to a source file, whereupon the editor stored the
> file in UTF-16LE encoding.

Subversion doesn't support UTF-16 as text file, it treats it as unknown (raw 
binary) file...

> Subversion (1.6.12) now complains that the file has inconsistent EOL-style.

...and that doesn't mix well with this text-specific setting.

You could try using UTF-8 instead, though I'm not sure how to explain that to 
MSVC, maybe just storing with a BOM is enough. MSVC allows saving as UTF-8 
when choosing "save as" in the "save" button's drop-down list, notepad.exe 
does that if you save as UTF-8, IIRC.


> Is there a workaround for this, such as setting eol-style to CRLF (i.e. not
> native)?

Simply deleting the svn:eol-style property would also silence the warning.

Uli


-- 
ML: http://subversion.apache.org/docs/community-guide/mailing-lists.html
FAQ: http://subversion.apache.org/faq.html
Docs: http://svnbook.red-bean.com/

Sator Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

**************************************************************************************
Sator Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
**************************************************************************************
           Visit our website at <http://www.satorlaser.de/>
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht verantwortlich.
**************************************************************************************

Re: UTF-16 files and inconsistent line endings

Posted by Stefan Sperling <st...@elego.de>.
On Thu, Oct 14, 2010 at 09:29:50AM +0100, David Aldrich wrote:
> Hi
> 
> I am developing with Visual C++ Express 2008 on Windows. I needed to add some Japanese characters to a source file, whereupon the editor stored the file in UTF-16LE encoding. Subversion (1.6.12) now complains that the file has inconsistent EOL-style.
> 
> Does Subversion 1.6 support UTF-16LE encoding?

Only if you mark the file as binary.

> Is there a workaround for this, such as setting eol-style to CRLF (i.e. not native)? 

Mark the file as binary.
See http://subversion.tigris.org/issues/show_bug.cgi?id=2194

Stefan