delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/04/27/11:34:54

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.1 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SARE_SUB_ENC_UTF8,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Date: Tue, 28 Apr 2009 00:34:36 +0900
Message-ID: <3f0ad08d0904270834uebbe029s643e00fc12b9cb4b@mail.gmail.com>
Subject: [1.7] cygstart with non-ASCII arguments and UTF-8 locale don't work.
From: IWAMURO Motonori <deenheart AT gmail DOT com>
To: cygwin AT cygwin DOT com
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

--000e0cd14ed86dbe6304688b1567
Content-Type: text/plain; charset=ISO-8859-7
Content-Transfer-Encoding: quoted-printable

Hi.

cygstart with non-ASCII arguments and UTF-8 locale don't work on cygwin-1.7=
.0.

> ls -l
total 1
-rw-rw-r-- 1 iwa None 7 Apr 28 00:22 =E1=E2=E3.txt
> cygstart =E1=E2=E3.txt
Unable to start 'C:\cygwin-1.7\tmp\=E1=E2=E3.txt': The specified file was n=
ot found.
--=20
IWAMURO Motnori <http://vmi.jp/>

--000e0cd14ed86dbe6304688b1567
Content-Type: application/octet-stream; name="cygstart.patch"
Content-Disposition: attachment; filename="cygstart.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_fu1bnh3j0

LS0tIG9yaWdzcmMvY3lndXRpbHMtMS4zLjQvc3JjL2N5Z3N0YXJ0L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YScsICBQT1BUX0FSR19TVFJJTkcsIE5VTEwsICdhJywgXApA
QCAtMjU3LDcgKzI4NCw3IEBACiAgICAgICAgICAgICAvKiBBY3Rpb24gb3B0
aW9ucyAqLwogICAgICAgICAgICAgY2FzZSAnYSc6CiAgICAgICAgICAgICAg
ICAgaWYgKGFyZyA9IHBvcHRHZXRPcHRBcmcob3B0Q29uKSkgewotICAgICAg
ICAgICAgICAgICAgICBpZiAoKGFjdGlvbiA9IHN0cmR1cChhcmcpKSA9PSBO
VUxMICkgeworICAgICAgICAgICAgICAgICAgICBpZiAoKGFjdGlvbiA9IG1i
c3Rvd2NzX2R1cChhcmcpKSA9PSBOVUxMICkgewogICAgICAgICAgICAgICAg
ICAgICAgICAgZnByaW50ZihzdGRlcnIsICIlczogbWVtb3J5IGFsbG9jYXRp
b24gZXJyb3JcbiIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ3ZbMF0p
OwogICAgICAgICAgICAgICAgICAgICAgICAgZXhpdCgxKTsKQEAgLTI2NSwz
MSArMjkyLDMxIEBACiAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAg
ICAgIGJyZWFrOwogICAgICAgICAgICAgY2FzZSAnbyc6Ci0gICAgICAgICAg
ICAgICAgaWYgKChhY3Rpb24gPSBzdHJkdXAoQUNUSU9OX09QRU4pKSA9PSBO
VUxMICkgeworICAgICAgICAgICAgICAgIGlmICgoYWN0aW9uID0gbWJzdG93
Y3NfZHVwKEFDVElPTl9PUEVOKSkgPT0gTlVMTCApIHsKICAgICAgICAgICAg
ICAgICAgICAgZnByaW50ZihzdGRlcnIsICIlczogbWVtb3J5IGFsbG9jYXRp
b24gZXJyb3JcbiIsIGFyZ3ZbMF0pOwogICAgICAgICAgICAgICAgICAgICBl
eGl0KDEpOwogICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICBi
cmVhazsKICAgICAgICAgICAgIGNhc2UgJ3gnOgotICAgICAgICAgICAgICAg
IGlmICgoYWN0aW9uID0gc3RyZHVwKEFDVElPTl9FWFBMT1JFKSkgPT0gTlVM
TCApIHsKKyAgICAgICAgICAgICAgICBpZiAoKGFjdGlvbiA9IG1ic3Rvd2Nz
X2R1cChBQ1RJT05fRVhQTE9SRSkpID09IE5VTEwgKSB7CiAgICAgICAgICAg
ICAgICAgICAgIGZwcmludGYoc3RkZXJyLCAiJXM6IG1lbW9yeSBhbGxvY2F0
aW9uIGVycm9yXG4iLCBhcmd2WzBdKTsKICAgICAgICAgICAgICAgICAgICAg
ZXhpdCgxKTsKICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAg
YnJlYWs7CiAgICAgICAgICAgICBjYXNlICdlJzoKLSAgICAgICAgICAgICAg
ICBpZiAoKGFjdGlvbiA9IHN0cmR1cChBQ1RJT05fRURJVCkpID09IE5VTEwg
KSB7CisgICAgICAgICAgICAgICAgaWYgKChhY3Rpb24gPSBtYnN0b3djc19k
dXAoQUNUSU9OX0VESVQpKSA9PSBOVUxMICkgewogICAgICAgICAgICAgICAg
ICAgICBmcHJpbnRmKHN0ZGVyciwgIiVzOiBtZW1vcnkgYWxsb2NhdGlvbiBl
cnJvclxuIiwgYXJndlswXSk7CiAgICAgICAgICAgICAgICAgICAgIGV4aXQo
MSk7CiAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgIGJyZWFr
OwogICAgICAgICAgICAgY2FzZSAnZic6Ci0gICAgICAgICAgICAgICAgaWYg
KChhY3Rpb24gPSBzdHJkdXAoQUNUSU9OX0ZJTkQpKSA9PSBOVUxMICkgewor
ICAgICAgICAgICAgICAgIGlmICgoYWN0aW9uID0gbWJzdG93Y3NfZHVwKEFD
VElPTl9GSU5EKSkgPT0gTlVMTCApIHsKICAgICAgICAgICAgICAgICAgICAg
ZnByaW50ZihzdGRlcnIsICIlczogbWVtb3J5IGFsbG9jYXRpb24gZXJyb3Jc
biIsIGFyZ3ZbMF0pOwogICAgICAgICAgICAgICAgICAgICBleGl0KDEpOwog
ICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICBicmVhazsKICAg
ICAgICAgICAgIGNhc2UgJ3AnOgotICAgICAgICAgICAgICAgIGlmICgoYWN0
aW9uID0gc3RyZHVwKEFDVElPTl9QUklOVCkpID09IE5VTEwgKSB7CisgICAg
ICAgICAgICAgICAgaWYgKChhY3Rpb24gPSBtYnN0b3djc19kdXAoQUNUSU9O
X1BSSU5UKSkgPT0gTlVMTCApIHsKICAgICAgICAgICAgICAgICAgICAgZnBy
aW50ZihzdGRlcnIsICIlczogbWVtb3J5IGFsbG9jYXRpb24gZXJyb3JcbiIs
IGFyZ3ZbMF0pOwogICAgICAgICAgICAgICAgICAgICBleGl0KDEpOwogICAg
ICAgICAgICAgICAgIH0KQEAgLTM4NSwxNSArNDEyLDE5IEBACiAgICAgICAg
IHdoaWxlICh0bXArKyAmJiAqdG1wKSB7CiAgICAgICAgICAgICBhcmdMZW5n
dGggKz0gMSArIHN0cmxlbigqdG1wKTsKICAgICAgICAgfQotICAgICAgICBp
ZiAoKGFyZ3MgPSAoY2hhciAqKSBtYWxsb2MoYXJnTGVuZ3RoKzEpKSA9PSBO
VUxMKSB7CisgICAgICAgIGlmICgoYXJncyA9ICh3Y2hhcl90ICopIG1hbGxv
YyhzaXplb2Yod2NoYXJfdCkgKiAoYXJnTGVuZ3RoICsgMSkpKQorICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgPT0gTlVMTCApIHsKICAgICAgICAgICAgIGZwcmlu
dGYoc3RkZXJyLCAiJXM6IG1lbW9yeSBhbGxvY2F0aW9uIGVycm9yXG4iLCBh
cmd2WzBdKTsKICAgICAgICAgICAgIGV4aXQoMSk7CiAgICAgICAgIH0KLSAg
ICAgICAgc3RyY3B5KGFyZ3MsICpyZXN0KTsKKyAgICAgICAgc2l6ZV90IGFy
Z09mZnNldCA9IG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IDMyKSB7
Ci0gICAgICAgICAgICAgICAgZnByaW50ZihzdGRlcnIsICJVbmFibGUgdG8g
c3RhcnQgJyVzJzogJXNcbiIsIGFQYXRoLCBzdGFydEVycm9yKChpbnQpIHNl
aS5oSW5zdEFwcCkpOworICAgICAgICAgICAgICAgIGZ3cHJpbnRmKHN0ZGVy
ciwgTCJVbmFibGUgdG8gc3RhcnQgJyVscyc6ICVzXG4iLCBhUGF0aCwgc3Rh
cnRFcnJvcigoaW50KSBzZWkuaEluc3RBcHApKTsKICAgICAgICAgICAgICAg
ICByZXR1cm4gMTsKICAgICAgICAgICAgIH0gZWxzZSB7Ci0gICAgICAgICAg
ICAgICAgZnByaW50ZihzdGRlcnIsICJVbmFibGUgdG8gc3RhcnQgJyVzJzog
IiwgYVBhdGgpOworICAgICAgICAgICAgICAgIGZ3cHJpbnRmKHN0ZGVyciwg
TCJVbmFibGUgdG8gc3RhcnQgJyVscyc6ICIsIGFQYXRoKTsKICAgICAgICAg
ICAgICAgICBwcmludExhc3RFcnJvcihzdGRlcnIpOwogICAgICAgICAgICAg
ICAgIGZwcmludGYoc3RkZXJyLCAiXG4iKTsKICAgICAgICAgICAgICAgICBy
ZXR1cm4gMTsK


--000e0cd14ed86dbe6304688b1567
Content-Type: text/plain; charset=us-ascii

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

- Raw text -


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