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

[RFC] - Proper encoding for patch file?

From: Mark Phippard <markphip_at_gmail.com>
Date: Thu, 8 Sep 2011 14:07:03 -0400

This is a JavaHL issue. See the attached patch which resolves the
problem I face.

If I use the JavaHL diff API to produce a patch it fails if there are
paths in the patch with UTF8 characters in the name. Here is an
example of the Exception:

    Invalid argument
svn: Can't convert string from 'UTF-8' to native encoding:
svn: Index: ?\230?\181?\139?\232?\175?\149?\230?\150?\135?\228?\187?\182.txt

RA layer request failed
svn: Error reading spooled REPORT request response

The problem seems to be that JavaHL creates the output file for the
patch with the encoding of SVN_APR_LOCALE_CHARSET. If I change this
to "utf-8" as shown in the patch then the method works.

The command line client from the same system works fine.

How do people feel about this? Does it make sense that JavaHL should
create the patch file with UTF-8 encoding? I tend to think it does,
but thought I would raise the question here.

Mark Phippard

Received on 2011-09-08 20:07:35 CEST

This is an archived mail posted to the Subversion Dev mailing list.

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