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
Shawn O. Pearce <spearce@spearce.org>
Date
Nov 26, 2009, 19:57 UTC
Message-ID
<20091126195736.GV11919@spearce.org>
In-Reply-To
<4B0E9F69.9040502@syntevo.com>
Thomas Singer <thomas.singer@syntevo.com> wrote:
Show 7 quoted lines
> > You mean we should do the same thing as Apple with HFS?  Are you serious?
> 
> Yes, I'm serious. IMHO there should be a defined clear encoding used for
> files names in the repository. Otherwise you don't know what you can expect
> by reading it - it could mean anything. File names are in fact strings which
> are based on characters. To convert characters to bytes (or visa versa) you
> need to know the encoding.

That's likely not going to fly. HFS+ has changed their decomposition rules at least once, which means the byte sequence for the same character sequence would differ, and a tree or commit hash would come out different depending upon which rules you were following. See [1] for details on what HFS+ does.

Also, Linus has previously stated HFS+ chose the worst possible way to encode the names. Getting Linus to admit he was wrong is impossible, getting Linus to accept the HFS+ encoding rules as the standard format used in a Git repository is not likely to happen. Fortunately Linus carries a slightly smaller stick in Git than he used to, but he is quite vocal and people tend to listen.

[1] http://developer.apple.com/mac/library/technotes/tn/tn1150.html#UnicodeSubtleties
-- 
Shawn.
Previous: Thomas SingerNext: Robin Rosenberg
Message 7 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.