From owner-freebsd-stable@freebsd.org Thu Oct 20 14:54:07 2016 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46D23C19A45 for ; Thu, 20 Oct 2016 14:54:07 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-qk0-x22d.google.com (mail-qk0-x22d.google.com [IPv6:2607:f8b0:400d:c09::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 022D193D for ; Thu, 20 Oct 2016 14:54:07 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-qk0-x22d.google.com with SMTP id o68so98822663qkf.3 for ; Thu, 20 Oct 2016 07:54:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=ufnjfgYcU4VxZv/A2jgF2ZNSAAAjaQekhxbQhUTVlpM=; b=oWybttdYOM55nomcN8Ct9D7iIiHtwvXbGYE+oLTdSwXcX49484IueWlcXpNAsDZrfU eTfqszAkLeOKbHapARfRNbwkcIC/484n4GMAnhp/IwCMifcXvfXzEUe+/3RpuwE4tRZr YKbBbamv4HyEJDwKn8WPCR6aD4exG8Eu6Fbu+SEYD5531+bbGAQTLCC/LcNY5BKNG2O2 dAkIWHFMOy400tCAD4xeHsTsr+9XsUQ9DKo33gEVhTaiYA3kRqWOAFVORkI/hObSYYoT Vq8e9xt/ktbN4DFU3FDsUq/ikNKNaJoV22F765D14x9uzR0d7y21SyySsmBAFCor6BCJ 6akQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=ufnjfgYcU4VxZv/A2jgF2ZNSAAAjaQekhxbQhUTVlpM=; b=eiSjmZsiEqJLiQbAQWzdhNiGOZJ1/z/kYM/6oQQ8+01DdPcSoN+INOXdi1jZ++ousy cyIGXo6vh9YlJg1XjrdG9XGhh+0gskDNEWDOC5SHAyLdlbARaNi39wYCa0qN32rlZBgZ aAbiKKAIDd7wZUEDD3Wd3PPn2CJtsGdpE7qfeGOdbPcfk9m+qe0nFKC4vCbMNf0e50m4 /psj90CWXKj13BSoK7yL/3uKmjFytASR3s4HSa5XgsthYshGFZdZdqhkR9MonROoMMrW VAvvZr+5Z8PEnshDiieUm1w5jADjRawqGnO12JmWXgi8ytBXw3K+0LkvK2ihY/K/cHrj RZ2g== X-Gm-Message-State: ABUngveLO5+qL8LVLt9jR+SUp3d76U7oFUCkEcaXsqnYW4/fBKrhjrB0uf7QT8x55CnYuu6hbiEkRSe6i+JYhQ== X-Received: by 10.55.92.193 with SMTP id q184mr1001844qkb.94.1476975246157; Thu, 20 Oct 2016 07:54:06 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.12.138.251 with HTTP; Thu, 20 Oct 2016 07:54:05 -0700 (PDT) In-Reply-To: <20161019171028.GF57876@zxy.spb.ru> References: <20161019171028.GF57876@zxy.spb.ru> From: Alan Somers Date: Thu, 20 Oct 2016 08:54:05 -0600 X-Google-Sender-Auth: Ay_okkI1KHMfPEZ2zjmjV2tI3L0 Message-ID: Subject: Re: tcsh is not handled correctly UTF-8 in arguments To: Slawa Olhovchenkov Cc: FreeBSD Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2016 14:54:07 -0000 On Wed, Oct 19, 2016 at 11:10 AM, Slawa Olhovchenkov wrote= : > tcsh called by sshd for invocation of scp: `tcsh -c scp -f =D0=A0=D0=B0= =D1=81=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B8=D0=B5.pdf` > At this time no any LC_* is set. > tcsh read .cshrc and set LC_CTYPE=3Dru_RU.UTF-8 LC_COLLATE=3Dru_RU.UTF-8. > After this invocation of scp will be incorrect: > > 00007ab0 20 2d 66 20 c3 90 c2 a0 c3 90 c2 b0 c3 91 c2 81 | -f ........= ....| > 00007ac0 c3 90 c2 bf c3 90 c2 b8 c3 91 c2 81 c3 90 c2 b0 |............= ....| > 00007ad0 c3 90 c2 bd c3 90 c2 b8 c3 90 c2 b5 5f c3 90 c2 |............= _...| > 00007ae0 a2 c3 90 c2 97 c3 90 c2 98 2e 70 64 66 0a |..........pd= f. | > > Correct invocation must be: > > 00000000 20 2d 66 20 | = -f | > 00000010 d0 a0 d0 b0 d1 81 d0 bf d0 b8 d1 81 d0 b0 d0 bd |............= ....| > 00000020 d0 b8 d0 b5 5f d0 a2 d0 97 d0 98 2e 70 64 66 0a |...._.......= pdf.| > > `d0` =3D> `c3 90` > `a0` =3D> `c2 a0` > > I.e. every byte re-encoded to utf-8: `d0` =3D> `c3 90` > > As result imposible to access files w/ non-ascii names. This might be related to PR213013. Could you please try on head after r306= 782 ?