Re: tcsh is not handled correctly UTF-8 in arguments

2016-10-20 Thread Slawa Olhovchenkov
On Thu, Oct 20, 2016 at 08:54:05AM -0600, Alan Somers wrote:

> On Wed, Oct 19, 2016 at 11:10 AM, Slawa Olhovchenkov  wrote:
> > tcsh called by sshd for invocation of scp: `tcsh -c scp -f Расписание.pdf`
> > At this time no any LC_* is set.
> > tcsh read .cshrc and set LC_CTYPE=ru_RU.UTF-8 LC_COLLATE=ru_RU.UTF-8.
> > After this invocation of scp will be incorrect:
> >
> > 7ab0  20 2d 66 20 c3 90 c2 a0  c3 90 c2 b0 c3 91 c2 81  | -f 
> > |
> > 7ac0  c3 90 c2 bf c3 90 c2 b8  c3 91 c2 81 c3 90 c2 b0  
> > ||
> > 7ad0  c3 90 c2 bd c3 90 c2 b8  c3 90 c2 b5 5f c3 90 c2  
> > |_...|
> > 7ae0  a2 c3 90 c2 97 c3 90 c2  98 2e 70 64 66 0a|..pdf. 
> >  |
> >
> > Correct invocation must be:
> >
> >    20 2d 66 20  | 
> > -f |
> > 0010  d0 a0 d0 b0 d1 81 d0 bf  d0 b8 d1 81 d0 b0 d0 bd  
> > ||
> > 0020  d0 b8 d0 b5 5f d0 a2 d0  97 d0 98 2e 70 64 66 0a  
> > |_...pdf.|
> >
> > `d0` =>  `c3 90`
> > `a0` =>  `c2 a0`
> >
> > I.e. every byte re-encoded to utf-8: `d0` =>  `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 
> r306782 ?

I think not related. PR213013 is about character classification, my
report is about unnecessary encoding shell arguments.
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Re: tcsh is not handled correctly UTF-8 in arguments

2016-10-20 Thread Alan Somers
On Wed, Oct 19, 2016 at 11:10 AM, Slawa Olhovchenkov  wrote:
> tcsh called by sshd for invocation of scp: `tcsh -c scp -f Расписание.pdf`
> At this time no any LC_* is set.
> tcsh read .cshrc and set LC_CTYPE=ru_RU.UTF-8 LC_COLLATE=ru_RU.UTF-8.
> After this invocation of scp will be incorrect:
>
> 7ab0  20 2d 66 20 c3 90 c2 a0  c3 90 c2 b0 c3 91 c2 81  | -f |
> 7ac0  c3 90 c2 bf c3 90 c2 b8  c3 91 c2 81 c3 90 c2 b0  ||
> 7ad0  c3 90 c2 bd c3 90 c2 b8  c3 90 c2 b5 5f c3 90 c2  |_...|
> 7ae0  a2 c3 90 c2 97 c3 90 c2  98 2e 70 64 66 0a|..pdf.  |
>
> Correct invocation must be:
>
>    20 2d 66 20  | -f |
> 0010  d0 a0 d0 b0 d1 81 d0 bf  d0 b8 d1 81 d0 b0 d0 bd  ||
> 0020  d0 b8 d0 b5 5f d0 a2 d0  97 d0 98 2e 70 64 66 0a  |_...pdf.|
>
> `d0` =>  `c3 90`
> `a0` =>  `c2 a0`
>
> I.e. every byte re-encoded to utf-8: `d0` =>  `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 r306782 ?
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

tcsh is not handled correctly UTF-8 in arguments

2016-10-19 Thread Slawa Olhovchenkov
tcsh called by sshd for invocation of scp: `tcsh -c scp -f Расписание.pdf`
At this time no any LC_* is set.
tcsh read .cshrc and set LC_CTYPE=ru_RU.UTF-8 LC_COLLATE=ru_RU.UTF-8.
After this invocation of scp will be incorrect:

7ab0  20 2d 66 20 c3 90 c2 a0  c3 90 c2 b0 c3 91 c2 81  | -f |
7ac0  c3 90 c2 bf c3 90 c2 b8  c3 91 c2 81 c3 90 c2 b0  ||
7ad0  c3 90 c2 bd c3 90 c2 b8  c3 90 c2 b5 5f c3 90 c2  |_...|
7ae0  a2 c3 90 c2 97 c3 90 c2  98 2e 70 64 66 0a|..pdf.  |

Correct invocation must be:

   20 2d 66 20  | -f |
0010  d0 a0 d0 b0 d1 81 d0 bf  d0 b8 d1 81 d0 b0 d0 bd  ||
0020  d0 b8 d0 b5 5f d0 a2 d0  97 d0 98 2e 70 64 66 0a  |_...pdf.|

`d0` =>  `c3 90`
`a0` =>  `c2 a0`

I.e. every byte re-encoded to utf-8: `d0` =>  `c3 90`

As result imposible to access files w/ non-ascii names.
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"