git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* jgit problems for file paths with non-ASCII characters
@ 2009-11-25 13:47 Marc Strapetz
  2009-11-25 21:11 ` Robin Rosenberg
  0 siblings, 1 reply; 10+ messages in thread
From: Marc Strapetz @ 2009-11-25 13:47 UTC (permalink / raw)
  To: git

I have noticed that jgit converts file paths to UTF-8 when querying the
repository. Especially,
org.eclipse.jgit.treewalk.filter.PathFilter#PathFilter performs this
conversion:

  private PathFilter(final String s) {
    pathStr = s;
    pathRaw = Constants.encode(pathStr);
  }

Because of this conversion, a TreeWalk fails to identify a file with
German umlauts. When using platform encoding to convert the file path to
bytes:

  private PathFilter(final String s) {
    pathStr = s;
    pathRaw = s.getBytes();
  }

the TreeWalk works as expected. Actually, the file path seems to be
stored with platform encoding in the repository.

Is this a bug or a misconfiguration of my repository? I'm using jgit
(commit e16af839e8a0cc01c52d3648d2d28e4cb915f80f) on Windows.

Thanks!

--
Best regards,
Marc Strapetz
=============
syntevo GmbH
http://www.syntevo.com
http://blog.syntevo.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-11-26 20:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-25 13:47 jgit problems for file paths with non-ASCII characters Marc Strapetz
2009-11-25 21:11 ` Robin Rosenberg
2009-11-26  0:54   ` [egit-dev] " Shawn O. Pearce
2009-11-26 13:09     ` Thomas Singer
2009-11-26 14:47       ` Johannes Schindelin
2009-11-26 15:31         ` Thomas Singer
2009-11-26 19:57           ` Shawn O. Pearce
2009-11-26 16:44       ` Robin Rosenberg
2009-11-26 14:25     ` Marc Strapetz
2009-11-26 20:03       ` Shawn O. Pearce

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).