Thread (14 messages) flat view 14 messages, 5 authors, 2016-06-15

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

From: Peter Krefting <hidden>
Date: 2016-06-15 22:46:19

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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help