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

Re: [PATCH I18N filenames v2 1/3] Add IO-wrappers for filenames encoding <local encoding> <-> UTF-8

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Oct 29, 2009, 09:26 UTC
Message-ID
<4AE95FDF.7030601@viscovery.net>
In-Reply-To
<1256752900-2615-1-git-send-email-timur@iris-comp.ru>
Timur Sufiev schrieb:
Show 9 quoted lines
> +#define opendir(a) opendir_i18n(a)
> +#define fopen(a, b) fopen_i18n(a, b)
> +#define chmod(a, b) chmod_i18n(a, b)
> +#define open open_i18n
> +#define stat(a, b) stat_i18n(a, b)
> +#define lstat(a, b) lstat_i18n(a, b)
> +#define readdir(a) readdir_i18n(a)
> +#define unlink(a) unlink_i18n(a)
> +#define link(a, b) link_i18n(a, b)

I doubt that such a whole-sale replacement is necessary. For example, names of object files (in .git/objects/XX) need not be translated, nor ref names.

Please review the infrastructure patch that Linus provided (as pointed out by Jeff) and see how you can build on it. IIRC, there are a handful of central places where path names must be massaged, and perhaps a few others as fall-out.

Moreover, once you know what to change, it would be worthwhile to check how the file name translation can be adjusted to use the UTF16 versions of the functions on Windows to avoid the UTF8<->UTF16 conversion (that happens on Windows behind the scenes). Perhaps MacOS can profit from this, too.

-- Hannes
Previous: Alex Riesen
Message 6 of 6 in “Add IO-wrappers for filenames encoding <local encoding> <-> UTF-8”
  1. 1/3 Add IO-wrappers for filenames encoding <local encoding> <-> UTF-8Timur Sufiev, Oct 28, 2009
  2. 2/3 Use I18N-wrappers everywhere in GitTimur Sufiev, Oct 28, 2009
  3. 3/3 Provide compatibility with MinGWTimur Sufiev, Oct 28, 2009
  4. Peter KreftingOct 29, 2009
  5. Alex RiesenOct 29, 2009
  6. Johannes SixtOct 29, 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.