Date: Thu, 20 Oct 2016 08:54:05 -0600 From: Alan Somers <asomers@freebsd.org> To: Slawa Olhovchenkov <slw@zxy.spb.ru> Cc: FreeBSD <freebsd-stable@freebsd.org> Subject: Re: tcsh is not handled correctly UTF-8 in arguments Message-ID: <CAOtMX2ishYa54=_910fVp=7qnCxeD6g94PwQfEJ401YZP9qXPQ@mail.gmail.com> In-Reply-To: <20161019171028.GF57876@zxy.spb.ru> References: <20161019171028.GF57876@zxy.spb.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 19, 2016 at 11:10 AM, Slawa Olhovchenkov <slw@zxy.spb.ru> 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 ?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2ishYa54=_910fVp=7qnCxeD6g94PwQfEJ401YZP9qXPQ>