You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mathias Weinert <ma...@gfa-net.de> on 2005/11/21 16:44:03 UTC

[Bug] ClientException with special characters in SVNClient.diff (JavaHL) if properties changed

Hi there,

I have a problem with the diff function in JavaHL's
SVNClient class (using (cygwin's) Subversion 1.2.3):

I have a file called 'x�x' (German umlaut 'a with
two dots on top' in the middle, just a test name).
When I now call SVNClient.diff for this file
everything's alright if just the file itself
got changed. But if there are property changes
the function throws a ClientException.

In detail:

In order to be on the safe side I don't call diff
with 'x�x' but with 'x%C3%A4x'.
So the call looks something like:
client.diff( "svn://path/to/repos/x%C3%A4x",
             219, 217, 219, "/d/Temp/File.diff",
             true, true, true, false );

If the file x�x is only changed itself (its content)
everything is okay, but when there is a property
change (with or without a content change) the
diff function throws a ClientExecption

"svn: Safe data '
Property changes on: x' was followed by non-ASCII
byte 195: unable to convert to/from UTF-8"

This also happens if I call the diff function
with the original name x�x.

So for me it seems as if there is some
encoding/decoding of the path name missing
in subversion (or the JavaHL bindings) when
asking for property changes.
(Or does anybody have an idea how to call diff
for this file?)

BTW: If I call
'diff -r 217:219 svn://path/to/repos/x�x@219 --force'
from the command line it works fine.

Mathias

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

Re: [Bug] ClientException with special characters in SVNClient.diff (JavaHL) if properties changed

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Mon, Nov 21, 2005 at 05:44:03PM +0100, Mathias Weinert wrote:
> I have a problem with the diff function in JavaHL's
> SVNClient class (using (cygwin's) Subversion 1.2.3):

> "svn: Safe data '
> Property changes on: x' was followed by non-ASCII
> byte 195: unable to convert to/from UTF-8"
> 

That's odd.  From what I can see, that message is only generated if
Subversion can't work out how to translate text between the native locale
and UTF-8; we then fall back to an ASCII-only mode.

Unfortunately I don't know a great deal about cygwin, but on my Linux and
Mac OS machines, I've got an 'iconv' utility; running 'iconv -t UTF-8 |
iconv -f UTF-8' acts as a filter, translating text on stdin (in the system
locale) into UTF-8 and back again (in other words, an identity transform,
assuming you can convert to UTF-8 and back).

You could try that: it may give you a useful error message (alternatively,
it may just be confusing if cygwin doesn't have iconv, or APR-on-cygwin
doesn't use it).

Regards,
Malcolm

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

Re: [Bug] ClientException with special characters in SVNClient.diff (JavaHL) if properties changed

Posted by Patrick Mayweg <ma...@qint.de>.
Hi Matthias,
it looks like JavaHL did not find the APR-Iconv Dlls, but the command 
line client does. Why it want to convert the path from or to UTF-8, I do 
not know.
Regards,
Patrick
Mathias Weinert wrote:

>Hi there,
>
>I have a problem with the diff function in JavaHL's
>SVNClient class (using (cygwin's) Subversion 1.2.3):
>
>I have a file called 'xäx' (German umlaut 'a with
>two dots on top' in the middle, just a test name).
>When I now call SVNClient.diff for this file
>everything's alright if just the file itself
>got changed. But if there are property changes
>the function throws a ClientException.
>
>In detail:
>
>In order to be on the safe side I don't call diff
>with 'xäx' but with 'x%C3%A4x'.
>So the call looks something like:
>client.diff( "svn://path/to/repos/x%C3%A4x",
>             219, 217, 219, "/d/Temp/File.diff",
>             true, true, true, false );
>
>If the file xäx is only changed itself (its content)
>everything is okay, but when there is a property
>change (with or without a content change) the
>diff function throws a ClientExecption
>
>"svn: Safe data '
>Property changes on: x' was followed by non-ASCII
>byte 195: unable to convert to/from UTF-8"
>
>This also happens if I call the diff function
>with the original name xäx.
>
>So for me it seems as if there is some
>encoding/decoding of the path name missing
>in subversion (or the JavaHL bindings) when
>asking for property changes.
>(Or does anybody have an idea how to call diff
>for this file?)
>
>BTW: If I call
>'diff -r 217:219 svn://path/to/repos/xäx@219 --force'
>from the command line it works fine.
>
>Mathias
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: dev-help@subversion.tigris.org
>
>  
>



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