GNU bug report logs - #6705
w32 cmdproxy.c pass args to cygwin; erroneous charset conversion (problem description, solution/suggestion)

Previous Next

Package: emacs;

Reported by: Laimonas Vėbra <laimonas.vebra <at> gmail.com>

Date: Thu, 22 Jul 2010 12:32:01 UTC

Severity: normal

Tags: moreinfo

Merged with 6546

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Laimonas Vėbra <laimonas.vebra <at> gmail.com>
Cc: 6705 <at> debbugs.gnu.org
Subject: bug#6705: w32 cmdproxy.c pass args to cygwin; erroneous charset conversion (problem description,	solution/suggestion)
Date: Thu, 22 Jul 2010 22:50:21 +0300
> Date: Thu, 22 Jul 2010 15:31:44 +0300
> From: Laimonas Vėbra <laimonas.vebra <at> gmail.com>
> Cc: 
> 
> Below is a comment that i wrote for myself in the cmpdproxy.c (it 
> explains the problem). I have a half (i suppose -- portable enough) of 
> working solution/fix for it using MultiByteToWideChar API function, but 
> i won't send a (partly working) patch, unless someone from the 
> developers who agree with the problem and intend to fix it will ask for it.

Sorry, I cannot understand your comments.  You talk about corrupted
conversion, but never add any detailed explanations, just examples.
Could you please elaborate?

The only thing I understand is that conversion of Unicode characters
to a Windows codepage that doesn't support those characters will be
lossy.  That part is clear, but:

  . did you try setting up your Windows to use the UTF-8 codepage
    65001?

  . since Cygwin 1.7 switched to using UTF-8, it parted itself even
    further from native Windows applications, so you now have one more
    reason to use the Cygwin build of Emacs instead of the native one

> Besides, the patch itself is larger than 10 diff lines and it uses 
> (duplicates by copying) some helper functions/declarations 
> (open_input_file(), close_file_data(), rva_to_section(), 
> w32_executable_type, RVA_TO_PTR) from unexw32.c, so it may need some 
> code refactoring.

This means we will be unable to accept the patches, even if we agree
to them, without you signing legal papers assigning copyright to the
FSF.

> how do one can/should (clearly) pass utf-8 arguments to an external 
> (cygwin) app on windows? I suppose, now it's not possible.

The Windows build of Emacs doesn't yet use the UTF-16 APIs.  Doing
that is a large job; volunteers are welcome, of course.  However,
passing UTF-8 arguments to subprocesses is hardly the first or the
most important thing that should be done in that regard, IMO.  File
access is much more important, this being an editor.





This bug report was last modified 3 years and 87 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.