git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [egit-dev] Re: jgit problems for file paths with non-ASCII characters

From
TSThomas Singer <thomas.singer@syntevo.com>
Date
Nov 26, 2009, 13:09 UTC
Message-ID
<4B0E7DF5.9040007@syntevo.com>
In-Reply-To
<20091126005423.GM11919@spearce.org>
> But as you said, this still doesn't make the Apple normal form
> any easier.  Though if we know we are on such a strange filesystem
> we might be able to assume the paths in the repository are equally
> damaged.  Or not.

Well, if the git-core folks could standardize on, e.g., composed UTF-8 (rather then just UTF-8), for storing file names in the repository, then everything should be clear, isn't it?

-- Best regards, Thomas Singer ============= syntevo GmbH http://www.syntevo.com http://blog.syntevo.com

Shawn O. Pearce wrote:
Show 36 quoted lines
> Robin Rosenberg <robin.rosenberg@dewire.com> wrote:
>> onsdag 25 november 2009 14:47:25 skrev  Marc Strapetz:
>>> I have noticed that jgit converts file paths to UTF-8 when querying the
>>> repository.
> ...
>>> Is this a bug or a misconfiguration of my repository? I'm using jgit
>>> (commit e16af839e8a0cc01c52d3648d2d28e4cb915f80f) on Windows.
>> A bug. 
>>
>> The problem here is that we need to allow multiple encodings since there
>> is no reliable encoding specified anywhere.
> 
> This is a design fault of both Linux and git.  git gets a byte
> sequence from readdir and stores that as-is into the repository.
> We have no way of knowing what that encoding is.  So now everyone
> touching a Git repository is screwed.
> 
>> The approach I advocate is
>> the one we use for handling encoding in general. I.e. if it looks like UTF-8,
>> treat it like that else fallback. This is expensive however
> 
> We should try to work harder with the git-core folks to get character
> set encoding for file names worked out.  We might be able to use a
> configuration setting in the repository to tell us what the proper
> encoding should be, and if not set, assume UTF-8.
> 
>> and then we have
>> all the other issues with case insensitive name and the funny property that
>> unicode has when it allows characters to be encoding using multiple sequences
>> of code points as empoloyed by Apple.
> 
> But as you said, this still doesn't make the Apple normal form
> any easier.  Though if we know we are on such a strange filesystem
> we might be able to assume the paths in the repository are equally
> damaged.  Or not.
> 
Previous: Shawn O. PearceNext: Johannes Schindelin
Message 4 of 10 in “jgit problems for file paths with non-ASCII characters”
  1. Marc StrapetzNov 25, 2009
  2. Robin RosenbergNov 25, 2009
  3. Shawn O. PearceNov 26, 2009
  4. Thomas SingerNov 26, 2009
  5. Johannes SchindelinNov 26, 2009
  6. Thomas SingerNov 26, 2009
  7. Shawn O. PearceNov 26, 2009
  8. Robin RosenbergNov 26, 2009
  9. Marc StrapetzNov 26, 2009
  10. Shawn O. PearceNov 26, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.