Unicode Windows API, Was: Concerns about using Python's ctypes library on Windows

timeless timeless at gmail.com
Sun Jul 31 15:17:56 CDT 2011


At the risk of being flamed again, I'd like to clarify that I meant
the new hg lib process thing that's under development.

If having the settings for each repo's hgrc managed by a distinct hg
process doesn't fix that person's complaint about corruption from
fixutf8, then I don't get how anything else would...

And wrt quoting, this is the gmail java app, I'd strip quoted text if
I could, but it doesn't show that at all, so I can't.

On 7/31/11, timeless <timeless at gmail.com> wrote:
> Thg should use the command shell api with one shell per repo. That
> should solve the fixutf8 conflict :)
>
> On 7/31/11, Adrian Buehlmann <adrian at cadifra.com> wrote:
>> (Please allow me to remove the personal cc's - I just happen to pick
>> something Matt said for this of my posting here. I'm pretty sure you
>> guys read the list mails anyway. Thanks.)
>>
>> On 2011-07-31 00:33, Matt Mackall wrote:
>>> On Sat, 2011-07-30 at 21:03 +0200, Mads Kiilerich wrote:
>>>> * The fixutf8 extension already implement this UTF-8 approach and seems
>>>> to have some happy users. It could perhaps be promoted to a standard
>>>> extension or it could be used as inspiration for a new and better and
>>>> more complete and maintainable implementation.
>>>
>>> I've always said something like this was the way forward (since long
>>> before fixutf8 appeared).
>>
>> I'm still wondering a bit why this has to be discussed in a thread I
>> started to try defending against some concerns that emerged about using
>> ctypes. FWIW, let me just note here that the fixutf8 Mercurial extension
>> uses Python's ctypes library as well.
>>
>> I'm extremely far from being an encoding guru, but to me as a Windows
>> "hacker" this looks a bit like a culture clash between Linux and Windows.
>>
>> And I'm worried that those like myself who can live pretty well with
>> using only ANSI characters in file names for a system I use on Windows
>> for tracking program sources could suffer from reduced speed or loss of
>> stability in Mercurial. IMHO, Its already pretty demanding to get and
>> keep Mercurial running on Windows.
>>
>> Not surprisingly, I've never used fixutf8 myself and of course I'm glad
>> I don't have to.
>>
>> Looking at the msdn web page
>>
>>   http://msdn.microsoft.com/en-us/library/dd374081(v=vs.85).aspx
>>
>> (Titled "Unicode"), Microsoft recommends that "New Windows applications
>> should use UTF-16 as their internal data representation".
>>
>> Microsoft also write on that page about the "Unicode-enabled functions"
>> that "These functions use UTF-16 (wide character) encoding, which is the
>> most common encoding of Unicode and the one used for native Unicode
>> encoding on Windows operating systems".
>>
>> I'm not saying that Mercurial is really a Windows Application or that
>> everyone has to follow what Microsoft says and recommends. I also
>> refrain from commenting on what is "most common" or not.
>>
>> What I'm asking myself a bit is how efficient regarding speed it is to
>> convert forth and back from UTF-16 at such a low layer as the fixutf8
>> extension naturally has to do it.
>>
>> As for the problem Kyung-Kook mentioned about enabling the fixutf8
>> extension per repo and TortoiseHg: This is indeed a bit of a general
>> problem. TortoiseHg has moved to a GUI that can show multiple
>> repositories in the same Window. It does this by using a "tabbed" user
>> interface which today is well known from browsers. Perhaps it should be
>> possible to restrict extensions like utf8 so that they are only allowed
>> to be enabled globally per user instead of per repository, and introduce
>> some (perhaps fixutf8-specific-) per repo config setting that says
>> whether said repo should be treated as a "utf8" repo or not. Perhaps it
>> might even make sense to introduce a .hg/requires file entry (possibly
>> named something like "utf8" or "fixutf8"), as it seems to me a repo
>> where fixutf8 has been used should naturally require that fixutf8 (or
>> some compatible equivalent software) is used to access such a repo.
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel at selenic.com
>> http://selenic.com/mailman/listinfo/mercurial-devel
>>
>
> --
> Sent from my mobile device
>

-- 
Sent from my mobile device


More information about the Mercurial-devel mailing list