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

AW: AW: svnlook proplist & unicode characters

From: Matthias Ludwig <matthias-ludwig_at_gmx.net>
Date: Wed, 17 Dec 2014 19:17:55 +0100

I extendes my little test program
(1) read the dir name from OS again and print the chars in hex format
(2) list the svn folder via "svn list" and print the chars in hex format
The java routine is attached.

 The output (see belos) shows that the file ist correctly written to disc and is correctly stored in the repository. Only the call to svnlook fails. I don't know why.

cmd.exe /C chcp 65001 & cmd.exe /C C:\Program Files (x86)\Subversion\bin\svnadmin create C:\test\repo
cmd.exe /C chcp 65001 & cmd.exe /C C:\Program Files (x86)\Subversion\bin\svn checkout file:///C:/test/repo C:\test\wc
Ausgecheckt, Revision 0.
>>>>String: o? bytewise: o=0x6f ?=0x308
cmd.exe /C chcp 65001 & cmd.exe /C C:\Program Files (x86)\Subversion\bin\svn add C:\test\wc\a --depth infinity
A wc\a
A wc\a\o?
cmd.exe /C chcp 65001 & cmd.exe /C C:\Program Files (x86)\Subversion\bin\svn commit C:\test\wc -m comment
Füge hinzu wc\a
Füge hinzu wc\a\o?

Revision 1 übertragen.
cmd.exe /C chcp 65001 & cmd.exe /C C:\Program Files (x86)\Subversion\bin\svn list file:///C:/test/repo/a
o?/
>>>>String: o?/ bytewise: o=0x6f ?=0x308 /=0x2f
cmd.exe /C chcp 65001 & cmd.exe /C C:\Program Files (x86)\Subversion\bin\svnlook proplist C:\test\repo //a//o?
svnlook: E160013: Pfad »/a/o¨« existiert nicht

> -----Ursprüngliche Nachricht-----
> Von: Philip Martin [mailto:philip.martin_at_wandisco.com]
> Gesendet: Mittwoch, 17. Dezember 2014 11:28
> An: Matthias Ludwig
> Cc: users_at_subversion.apache.org
> Betreff: Re: AW: svnlook proplist & unicode characters
>
> "Matthias Ludwig" <matthias.ludwig_at_stl-software.de> writes:
>
> > run(pathToSvn, pathToTest, repo,
> env,pathToSvn+"\\svnadmin","create",repo.getAbsolutePath());
> > run(pathToSvn, pathToTest, repo,
> env,pathToSvn+"\\svn","checkout",url,wc.getAbsolutePath());
> >
> >
> > new
> File(wc.getAbsoluteFile()+"\\a\\o\u0308").mkdirs();
>
> That shows you passing a literal decomposed character through Java
> String to the OS without going through Subversion. Are you using the
> 65001 code page here? Does Java String do any conversion on decomposed
> literals? The filename will be UTF-16 on disk so some conversion has
> happened somewhere.
>
> >
> > run(pathToSvn, pathToTest, repo,
> env,pathToSvn+"\\svn","add",wc.getAbsolutePath()+"\\a","--
> depth","infinity");
> >
> > run(pathToSvn, pathToTest, repo,
> env,pathToSvn+"\\svn","commit",wc.getAbsolutePath(),"-m","comment");
>
> That does not involve the decomposed literal. Subversion will get
> something from the OS when it looks inside 'a' but whether it is
> decomposed depends on what conversion happened above. I don't know
> what
> tools are available on Windows to look at encoding of file names but you
> could run "svnadmin dump" on the repository and see what encoding was
> used in the repository.
>
> When your mail got to me it included:
>
> A wc\a\o?
>
> so I can't tell what encoding was used on disk.
>
> > run(pathToSvn, pathToTest, repo,
> env,pathToSvn+"\\svnlook","proplist",repo.getAbsolutePath(),"//a//o\u030
> 8");
> >
>
> Now you are attempting to pass the decomposed literal to Subversion and
> using code page 65001. I don't know what, if any, conversion Java
> String will do.
>
> Your mail included
>
> svnlook: E160013: Pfad »/a/o¨« existiert nicht
>
> and what I see is 'o' '0xC2' '0xA8' so the decomposed character U+0308
> has been converted to U+00A8. I don't know if that conversion happened
> during the test or as part of the email process. U+0308 and U+00A8 are
> different paths as far as Subversion is concerned.
>
> --
> Philip Martin | Subversion Committer
> WANdisco // *Non-Stop Data*

  • application/octet-stream attachment: Test.java
Received on 2014-12-17 19:18:28 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.