monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] bug report - running Monotone under Windows XP fai


From: Zack Weinberg
Subject: Re: [Monotone-devel] bug report - running Monotone under Windows XP fails if user account path has non-ascii characters
Date: Wed, 11 Feb 2009 08:48:19 -0800

On Wed, Feb 11, 2009 at 5:39 AM, João Felipe Santos <address@hidden> wrote:
> C:\Windows\System32>mtn
> mtn: error: failed to convert string from UTF-8 to ASCII: 'C:/Documents and 
> Sett
> ings/JoÒo/Dados de aplicativos/monotone/dump'
>
> (note that the "ã" character appears as Ò here)

This is a known and fairly well-understood bug that nobody has gotten
around to fixing; if you have time to do it we would welcome patches.
The problem is that monotone blindly assumes pathnames returned from
various system functions (getcwd, FindFirst/FindNext, etc) are already
in UTF-8, which is almost always wrong.

If you were willing to patch this, what you would need to do is go
through win32/fs.cc and change everything that talks to the system to
use the Unicode-aware Win32 APIs (the *W functions) and then call the
appropriate "charset.hh" functions to convert what you get from that
into UTF-8.  (You might also have to add the necessary conversion
functions -- i'm not sure we currently have anything that understands
WCHAR_T or whatever it is Windows calls the type of those strings.)

(It's actually easier to get this right on Windows than on Unix
because Windows enforces a consistent encoding for pathnames - we're
just not paying attention.  On Unix (other than Mac) pathnames are
arbitrary byte vectors; one can *hope* that they are strings in the
user's locale's encoding but one may very well be wrong.)

> D:\>mtn version --full
> ?: fatal: std::logic_error: ../monotone-0.41/paths.cc:303: invariant 
> 'I(!is_abso
> lute_here(inT))' violated
> ?: this is almost certainly a bug in monotone.
> ?: please send this error message, the output of '? version --full',
> ?: and a description of what you were doing to address@hidden
> ?: discarding debug log, because I have nowhere to write it
> ?: (maybe you want --debug or --dump?)

Now that's just bizarre.  Could you try

D:\>mtn version --debug

and post the *complete* output?

thanks,
zw




reply via email to

[Prev in Thread] Current Thread [Next in Thread]