Re: [RFC PATCH] Windows: Assume all file names to be UTF-8 encoded.
- From
Peter Krefting <peter@softwolves.pp.se>
- Date
- Mar 3, 2009, 11:56 UTC
- Message-ID
- <alpine.DEB.2.00.0903031254440.3702@perkele.intern.softwolves.pp.se>
- In-Reply-To
- <37fcd2780903030143t7abe33d5sb7d8163c3c9bf505@mail.gmail.com>
Dmitry Potapov:
> IMHO, you grossly underestimate what is needed to enable UTF-8 encoding in > Windows. AFAIK, Microsoft C runtime library does not support UTF-8, so you > have to wrap all C functions taking 'char*' as an input parameter.
I have to wrap all file-related functions, at least.
> For example, think about what is going to happen if Git tries to print a > simple error message: fprintf (stderr, "unable to open %s", path);
Yeah. That's a problem. That might be solvable by setting the thread locale to something UTF-8 based and have the console window convert to the output codepage (that is what it does when you use wprintf and friends).
> And the command-line is not the only source of file names. Some Git > commands read list of files from stdin usually though the pipe. In what > encoding are they going to be?
Indeed. Pipes are a problem.
-- \\// Peter - http://www.softwolves.pp.se/