delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/12/07/12:00:36

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE
X-Spam-Check-By: sourceware.org
From: Bengt Larsson <lists DOT cygwin3 AT bengtl DOT net>
To: cygwin AT cygwin DOT com
Subject: Re: [ANNOUNCEMENT] CALL FOR TESTING: Cygwin 1.7.10
Date: Wed, 07 Dec 2011 18:00:06 +0100
Reply-To: cygwin AT cygwin DOT com
Message-ID: <566vd7hfmi3j980ic4m64d7bv91b5qm6uh@4ax.com>
References: <announce DOT 20111206093746 DOT GA6222 AT calimero DOT vinschen DOT de>
In-Reply-To: <announce.20111206093746.GA6222@calimero.vinschen.de>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

----=_ms6vd71a5j24e7t6teso1h84b8ddmnffbj.MFSBCHJLHS
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Corinna Vinschen wrote:

>- cygwin_conv_path and cygwin_conv_path_list: In CCP_WIN_A_TO_POSIX and
>  CCP_POSIX_TO_WIN_A conversions, use the current Windows ANSI or OEM
>  charset, depending on the return value of AreFileApisANSI.  Up to Cygwin
>  1.7.9, both conversions used the current Cygwin charset for the conversi=
on.

Is that the right thing to do? I have LANG=3DC.UTF-8. If I pass a
Windows-style filename on the command line, it's passed as UTF-8. How do
I then convert that to Unix-style, UTF-8?

Example program attached. Run with for example "testpath =E5=E4=F6.txt" and
"testpath 'C:\WINDOWS\=E5=E4=F6.txt'"

I tried with the snapshot DLL (not any other files) from 20111207 and
got garbage (double-encoded UTF-8).


----=_ms6vd71a5j24e7t6teso1h84b8ddmnffbj.MFSBCHJLHS
Content-Type: application/octet-stream; name=testpath.c
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=testpath.c

I2luY2x1ZGUgPHN5cy9jeWd3aW4uaD4KI2luY2x1ZGUgPGxpbWl0cy5oPgoj
aW5jbHVkZSA8c3RkaW8uaD4KCmludAptYWluKGludCBhcmdjLCBjaGFyICph
cmd2W10pCnsKCWNoYXIgb3V0W1BBVEhfTUFYXTsKCQoJaWYgKGFyZ2MgPiAx
KSB7CgkJaWYgKGN5Z3dpbl9jb252X3BhdGgoQ0NQX1dJTl9BX1RPX1BPU0lY
IHwgQ0NQX1JFTEFUSVZFLCBhcmd2WzFdLCBvdXQsIFBBVEhfTUFYKSkgewoJ
CQlwZXJyb3IoIkVycm9yIGluIGN5Z3dpbl9jb252X3BhdGgiKTsKCQkJcmV0
dXJuIDE7CgkJfQoJCQoJCXByaW50Zigib3V0ID0gJXNcbiIsIG91dCk7Cgl9
CgkKCXJldHVybiAwOwp9Cg==


----=_ms6vd71a5j24e7t6teso1h84b8ddmnffbj.MFSBCHJLHS
Content-Type: text/plain; charset=us-ascii

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
----=_ms6vd71a5j24e7t6teso1h84b8ddmnffbj.MFSBCHJLHS--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019