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

Re: Bug patching Unicode files

From: Stefan Sperling <stsp_at_elego.de>
Date: Fri, 25 Nov 2016 14:32:08 +0100

On Fri, Nov 25, 2016 at 01:38:02PM +0100, Hugo González wrote:
> Apart from that, I tried to fix the diff file myself, just to check if the
> error was only during the generation of the diff file or also to apply an
> Unicode diff file. I edited the “changes.diff” file using Notepad++ and
> removed the “\0” codes, so I had an ANSI diff file called
> “changes_fixed.diff” that also fails in the same way to apply the patch. I
> also converted the ANSI diff file into an Unicode UCS2-LittleEndian file
> with Notepad++, and now Subversion cannot apply the patch… So, it seems
> there could be three bugs there: one in the creation of diff files, another
> one applying ANSI diff files to Unicode files, and another just working with
> Unicode diff files. I attach all the examples again, with the manually fixed
> diff files. Best regards,
>
>
>
> Hugo González

Hi Hugo,

Subversion only supports Unicode it if is encoded as UTF-8.

Unicode represented in encodings other than UTF-8 is usually treated
like a binary file. Fixing this would be a major effort.
See https://issues.apache.org/jira/browse/SVN-2194

If you convert files you want to use with 'svn patch' to UTF-8, then
things should "just work". Note that conversion between UTF-8 and UTF-16
is generally lossless, so in the worst case this would add extra (but
nonetheless inconvenient) conversion steps to your workflow.

Regards,
Stefan
Received on 2016-11-25 14:33:11 CET

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.