From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Passing unicode filenames to start-process on Windows? Date: Thu, 07 Jan 2016 18:00:11 +0200 Message-ID: <83h9ip2xdg.fsf@gnu.org> References: <83si2a3cuo.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1452182420 15521 80.91.229.3 (7 Jan 2016 16:00:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Jan 2016 16:00:20 +0000 (UTC) Cc: emacs-devel@gnu.org To: Klaus-Dieter Bauer Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 07 17:00:10 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aHCyu-00054b-Ua for ged-emacs-devel@m.gmane.org; Thu, 07 Jan 2016 17:00:09 +0100 Original-Received: from localhost ([::1]:59247 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHCyu-0003jS-9X for ged-emacs-devel@m.gmane.org; Thu, 07 Jan 2016 11:00:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHCyp-0003jA-MT for emacs-devel@gnu.org; Thu, 07 Jan 2016 11:00:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHCym-0008Kd-8A for emacs-devel@gnu.org; Thu, 07 Jan 2016 11:00:03 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHCym-0008KZ-4s; Thu, 07 Jan 2016 11:00:00 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1665 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aHCyl-0007jw-GL; Thu, 07 Jan 2016 10:59:59 -0500 In-reply-to: (message from Klaus-Dieter Bauer on Wed, 6 Jan 2016 22:19:39 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:197733 Archived-At: > From: Klaus-Dieter Bauer > Date: Wed, 6 Jan 2016 22:19:39 +0100 > Cc: emacs-devel@gnu.org > > I thought up some workarounds, but they all run into limitations: > > * w32-short-file-name: Doesn't work, because in modern Windows systems 8.3 file > names may not be generated, so it may just return the unchanged filename. > * rename-file: Allows working with a name via a temporary supported file name. > Sadly there is no way to guarantee that such renaming is undone afterwards. > * copy-file (to a temporary directory): Would work for the current application, > but unviable when larger amounts of data are involved. > > Would you happen to know any other possible workaround? The only one that would work reliably is to pass arguments via a file or a pipe. (Some program support "response files" as a replacement for command-line arguments, or can read the arguments from stdin.) Do you really have programs that can support text outside of the current system codepage? If you don't, then passing arguments with such strings is the least of your problems: once you do get these strings into the program, the program won't be able to do anything useful with them: all the library functions that receive C strings will misbehave, you won't be able to open files with such names, etc. IOW, I'm not sure I understand your use case in enough detail to provide useful advice. Perhaps describe what you want to do and the program you want to invoke from Emacs in more detail.