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

Re: [RFC PATCH] Windows: Assume all file names to be UTF-8 encoded.

From
LNLars Noschinski <lars-2008-2@usenet.noschinski.de>
Date
Mar 3, 2009, 07:56 UTC
Message-ID
<20090303075655.GB9875@lars.home.noschinski.de>
In-Reply-To
<alpine.DEB.2.00.0903022135360.20047@perkele.intern.softwolves.pp.se>
* Peter Krefting <peter@softwolves.pp.se> [09-03-02 21:41]:
Show 6 quoted lines
> Indeed. It is unfortunate that this wasn't properly specified to start with. 
> It's mostly a minor issue since *most* people will not use non-ASCII file 
> names. At least for most of the kind of projects that Git have attracted so 
> far, so the problem is not that big. The problem is if Git is to attract "the 
> masses". Especially on Windows, where file names using non-ASCII are common, 
> this needs to be addressed eventually.

Using no encoding for filenames was the obvious (and I would argue) correct choice. Unix filenames are specified to be a sequence of bytes, excluding '/' and '\0'. A lot of these sequences are not valid UTF-8. Further, the encoding needed for filenames depends on the encoding used in the source code for referencing these files. Again, for the unix file handling functions, this means no encoding.

Changing the filename (on checkout), so that the user sees an Ü regardless of his or her locale (instead of an \0xDC, which only resolves to an Ü on latin-1) would be an absolutely broken concept here.

Show 6 quoted lines
> >[*] I'm _extremely_ tempted to write "people using non-broken OSes", but let's 
> >pretend to be neutral for a second.
> 
> In most cases, I would most definitely agree with you on calling it that, but 
> when it comes to Unicode support, Windows is one of the least broken OSes (with 
> Symbian being my favourite).
IMHO having encoding specific open functions is begging for problems.
 - Lars.
Previous: Peter KreftingNext: Peter Krefting
Message 18 of 26 in “Windows: Assume all file names to be UTF-8 encoded.”
  1. Windows: Assume all file names to be UTF-8 encoded.Peter Krefting, Mar 2, 2009
  2. Johannes SixtMar 2, 2009
  3. Peter KreftingMar 2, 2009
  4. Johannes SchindelinMar 2, 2009
  5. Peter KreftingMar 2, 2009
  6. Johannes SixtMar 2, 2009
  7. Peter KreftingMar 2, 2009
  8. Robin RosenbergMar 2, 2009
  9. Peter KreftingMar 2, 2009
  10. Robin RosenbergMar 2, 2009
  11. Peter KreftingMar 3, 2009
  12. Dmitry PotapovMar 3, 2009
  13. Peter KreftingMar 3, 2009
  14. Robin RosenbergMar 7, 2009
  15. Peter KreftingMar 2, 2009
  16. Thomas RastMar 2, 2009
  17. Peter KreftingMar 2, 2009
  18. Lars NoschinskiMar 3, 2009
  19. Peter KreftingMar 3, 2009
  20. Lars NoschinskiMar 3, 2009
  21. Robin RosenbergMar 3, 2009
  22. Dmitry PotapovMar 3, 2009
  23. Peter KreftingMar 3, 2009
  24. Dmitry PotapovMar 3, 2009
  25. Peter KreftingMar 4, 2009
  26. Dmitry PotapovMar 4, 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.