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

Re: File Encodings for result file when using TortoiseMerge

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Wed, 11 Sep 2013 19:48:51 +0200

On 11.09.2013 18:05, Michael Schlenker wrote:
> Hi all,
>
> i have some issues with the TortoiseMerge picking surprising encodings
> for the results of a merge.
>
> We are trying to move some source files from ISO-8859-1 to UTF-8 encoding.
>
> e.g.
> /svn/branches/v1/test.py is ISO-8859-1 encoded containing some umlauts
> /svn/trunk/test.py is UTF-8 encoded
>
> Now a change (unrelated to the umlauts) happens to test.py in the
> ISO-8859-1 branch, and i need to merge.
>
> e.g.: a conflict happens because both sides have modified 'some change',
> but the diff is larger due to UTF-8/ISO-8859-1 changes.
>
> <<<<<<< .working
> y = "some change 2"
> y = "abcchange"
> x = "some evil üäößÖÄÜ Umlauts"
> =======
> y = "some change 1"
> x = "some evil üäößÖÄÜ Umlauts"
>>>>>>>> .merge-right.r101860
>
> Working Copy is UTF-8, merge-right ISO-8859-1 (or maybe CP1252, doesn't
> matter really). This is just fine.
>
> Now running TortoiseMerge from TortoiseSVN to resolve the conflict, the
> working copy is on the right, the merge file on the left, encoding is
> correctly detected (as seen in the lower bar of the window) and
> displayed (e.g. no broken UTF-8 stuff, both umlaut lines look identical
> in the left, right and bottom Window).
>
> But when i cherry pick some lines:
> y = "some change 1" --> ISO
> y = "abcchange" --> UTF-8
> x = "some evil üäößÖÄÜ Umlauts" --> UTF-8
>
> and save the file, the merged file contains ISO-8859-1 umlauts, even
> though i explictly selected some lines from the UTF-8 (right) side for
> merge.
>
> So, merging from Branch -> TRUNK breaks my TRUNK files encoding.
>
> If i do the merge down from TRUNK -> Branch, and pick the UTF-8 side, i
> get UTF-8 encoded umlauts as a result. If i pick the ISO-8859-1 side, i
> also get UTF-8 encoded umlauts.
>
> So merging from TRUNK -> Branch also breaks my file encodings.
>
> It seems like a deliberate 'feature' to always pick the left sides
> encoding, but it is very inconvenient for merging up and down between
> branches with differing file encodings.
>
> So, my questions:
>
> 1. Is there a way to configure TortoiseSVN/TortoiseMerge to pick the
> encoding of the working copy file for the result automatically, or force
> an output encoding to use?

Yes, there is (in TSVN 1.8.x):
double click on the status bar part where the encoding of the view is
shown. A dialog will pop up where you can select the encoding of the
view, and that's how the file will then be saved.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest interface to (Sub)version control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3064370
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2013-09-11 19:48:59 CEST

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

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