Initial support of Unicode filenames

Matt Mackall mpm at selenic.com
Fri Oct 28 17:58:46 CDT 2011


On Sat, 2011-10-29 at 00:28 +0200, Victor Stinner wrote:
> Hi,
> 
> On Windows, filenames are stored as Unicode. There is a bytes API providing a 
> backward compatibility, but it should not be used, because you may get invalid 
> filename (with question marks, ?) if a filename is not encodable to the ANSI 
> code page.
> 
> Attached patch uses Unicode filenames to avoid encoding issues on Windows. The 
> patch on ui.py uses backslashreplace to escape unencodable characters when 
> writing filenames to the console (and so not fail if a character is not 
> encodable to the console code page).

I'm afraid I've already vetoed about a dozen variants of this suggestion
over the years. For starters, it is not backward-compatible with
existing Windows users.

Suggested reading:

http://mercurial.selenic.com/wiki/EncodingStrategy
http://markmail.org/message/a7k7jhvjr6h3gjc3

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list