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