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

Re: [PATCH] Use FIX_UTF8_MAC to enable conversion from UTF8-MAC to UTF8

From
Mark Junker <mjscod@web.de>
Date
Jan 21, 2008, 10:36 UTC
Message-ID
<fn1sk4$uh4$1@ger.gmane.org>
In-Reply-To
<7vve5nzdqx.fsf@gitster.siamese.dyndns.org>
Junio C Hamano schrieb:
> I do not know how Macintosh libc implements "struc dirent", but
> this approach does not work in general.

IMHO there is no need that this approach works in general because this is a fix for MacOSX systems only. I also use d_namlen which might not be available on other systems. But on MacOSX this works as expected.

> yet you can obtain a path component longer than 256 bytes.
> Apparently the library allocates longer d_name[] field than what
> is shown to the user.

This is not a problem either because on MacOSX we get decomposed UTF8 and we always convert to composed UTF8. This means that the string returned from reencode_string will always be smaller than the original filename that had to be reencoded.

Regards, Mark

Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 22 in “Use FIX_UTF8_MAC to enable conversion from UTF8-MAC to UTF8”
  1. Use FIX_UTF8_MAC to enable conversion from UTF8-MAC to UTF8Mark Junker, Jan 21, 2008
  2. Mark JunkerJan 21, 2008
  3. Mark JunkerJan 21, 2008
  4. Mark JunkerJan 21, 2008
  5. Junio C HamanoJan 21, 2008
  6. Mark JunkerJan 21, 2008
  7. Junio C HamanoJan 21, 2008
  8. Mark JunkerJan 21, 2008
  9. H. Peter AnvinJan 22, 2008
  10. Linus TorvaldsJan 22, 2008
  11. Linus TorvaldsJan 22, 2008
  12. Junio C HamanoJan 22, 2008
  13. Robin RosenbergJan 22, 2008
  14. Dmitry PotapovJan 22, 2008
  15. Dmitry PotapovJan 22, 2008
  16. Nicolas PitreJan 22, 2008
  17. Linus TorvaldsJan 22, 2008
  18. Johannes SchindelinJan 21, 2008
  19. Junio C HamanoJan 21, 2008
  20. Mark JunkerJan 21, 2008
  21. Johannes SchindelinJan 21, 2008
  22. Johannes SchindelinJan 21, 2008

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.