Re: uuencode: multi-bytes char in remote file name contains bytes >0x80

2011-07-06 Thread Eric
Hi all: If there are characters in *decode_pathname* that are not in the portable > filename character set the results are unspecified. I think we could do some work to solve the non-ASCII file name problem according to the above feature. the implementation is not a problem, the point is whet

Re: uuencode: multi-bytes char in remote file name contains bytes >0x80

2011-07-06 Thread Eli Zaretskii
> Date: Tue, 05 Jul 2011 14:12:01 -0700 > From: Bruce Korb > CC: 張叁 , > Bruno Haible , > Eli Zaretskii , bug-gnulib@gnu.org, bug-gnu-ut...@gnu.org, > "\"Eric\" toe lin" > > Meanwhile, I'm still waiting for a good answer to, "Why do it at all?" Because not doing that would severely limit uu

Re: uuencode: multi-bytes char in remote file name contains bytes >0x80

2011-07-06 Thread ��叁
> > If there are characters in *decode_pathname* that are not in the portable > filename character set the results are _unspecified_. > 2011/7/6 Bruce Korb > On 07/05/11 13:13, Eric Blake wrote: > >> On 07/05/2011 12:12 PM, Bruce Korb wrote: >> >>> On 07/05/11 10:13, Eric Blake wrote: >>> >>>

Re: uuencode: multi-bytes char in remote file name contains bytes >0x80

2011-07-05 Thread Bruce Korb
On 07/05/11 13:13, Eric Blake wrote: On 07/05/2011 12:12 PM, Bruce Korb wrote: On 07/05/11 10:13, Eric Blake wrote: begin 444 hex-encode-EN:6865782d656e636f64652d44453a42414446 that is, presence of : in the desired output name implies that the file name must be encoded, just the same as any 8-

Re: uuencode: multi-bytes char in remote file name contains bytes >0x80

2011-07-05 Thread Eric Blake
On 07/05/2011 12:12 PM, Bruce Korb wrote: > On 07/05/11 10:13, Eric Blake wrote: >> begin 444 hex-encode-EN:6865782d656e636f64652d44453a42414446 >> >> that is, presence of : in the desired output name implies that the file >> name must be encoded, just the same as any 8-bit byte also makes that >>

Re: uuencode: multi-bytes char in remote file name contains bytes >0x80

2011-07-05 Thread Bruce Korb
On 07/05/11 10:13, Eric Blake wrote: begin 444 hex-encode-EN:6865782d656e636f64652d44453a42414446 that is, presence of : in the desired output name implies that the file name must be encoded, just the same as any 8-bit byte also makes that implication. Yep, but part of the whole point of uuenc

Re: uuencode: multi-bytes char in remote file name contains bytes >0x80

2011-07-05 Thread John Cowan
Eric Blake scripsit: > When used according to POSIX, the 'decode_pathname' argument (POSIX > notation, or REMOTEFILE argument in 'uuencode --help' notation) is > output literally in the resulting output of 'uuencode' on the line > starting with "begin"; that resulting output is also required by PO

Re: uuencode: multi-bytes char in remote file name contains bytes >0x80

2011-07-05 Thread Eric Blake
On 07/05/2011 10:58 AM, Bruce Korb wrote: > On 07/05/11 08:06, Eric Blake wrote: >> I'm not quite sure what you are asking me to do here. Maybe it helps to >> read the current POSIX requirements on uuencode output: >> >> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/uuencode.html > >

Re: uuencode: multi-bytes char in remote file name contains bytes >0x80

2011-07-05 Thread Bruce Korb
On 07/05/11 08:06, Eric Blake wrote: I'm not quite sure what you are asking me to do here. Maybe it helps to read the current POSIX requirements on uuencode output: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/uuencode.html I read that, though I was sure not as carefully as someo

Re: uuencode: multi-bytes char in remote file name contains bytes >0x80

2011-07-05 Thread Eric Blake
On 07/05/2011 09:45 AM, John Cowan wrote: > Eric Blake scripsit: > >> [B]ut if filename is _not_ a character string in the current locale, then >> the output would _not_ be a text file (among other things, a text file >> has the property that at least one locale can interpret every byte >> sequenc

Re: uuencode: multi-bytes char in remote file name contains bytes >0x80

2011-07-05 Thread John Cowan
Eric Blake scripsit: > [B]ut if filename is _not_ a character string in the current locale, then > the output would _not_ be a text file (among other things, a text file > has the property that at least one locale can interpret every byte > sequence in the file as valid characters). Say what?

Re: uuencode: multi-bytes char in remote file name contains bytes >0x80

2011-07-05 Thread Eric Blake
On 07/05/2011 08:40 AM, Bruce Korb wrote: > 2. Assuming that you want a localized file name for this archive file, >you thus still want to encode the file name for transmission. >To do this, you would use code like this: > dst = malloc(2 * strlen(p) + 1); > while (*p) { >

Re: uuencode: multi-bytes char in remote file name contains bytes >0x80

2011-07-05 Thread Bruce Korb
Hi Duhuanpeng, On 07/05/11 06:44, 張叁 wrote: Let me try to write something in English. Please to correct my English. :-) Eric is helping me in some i18n stuff for NTP, hopefully he can help translate when things become confused. Please include original Chinese plus your English so he can detec

Re: uuencode: multi-bytes char in remote file name contains bytes >0x80

2011-07-05 Thread ��叁
Let me try to write something in English. Please to correct my English. :-) firstly, thanks to Korb for reading my ugly code. :) Korb is the problem is users using uuencode to uuencode a file, he may expect every btye is ASCII in encodeed file. but when a NOT-ASCII file name apears, the problem c

Re: uuencode: multi-bytes char in remote file name contains bytes >0x80

2011-07-04 Thread Eli Zaretskii
> From: Bruno Haible > Date: Mon, 4 Jul 2011 22:58:43 +0200 > Cc: bug-gnulib@gnu.org, > bug-gnu-ut...@gnu.org, > q24...@gmail.com, > bk...@gnu.org > > > Doesn't the same problem exist with the file's data itself? > > No, there is normally no problem with the contents of the files, because use

Re: uuencode: multi-bytes char in remote file name contains bytes >0x80

2011-07-04 Thread Bruno Haible
Eli, > > An obvious problem with the patch is that it considers a file name to be a > > byte sequence. But different users may work in different locales, with > > different encodings. And users want to see the original filenames. Users don't want to see mojibake, that is, a mix of garbled charact

Re: uuencode: multi-bytes char in remote file name contains bytes >0x80

2011-07-04 Thread Eli Zaretskii
> From: Bruno Haible > Date: Sun, 3 Jul 2011 22:43:55 +0200 > Cc: bug-gnu-ut...@gnu.org, 張叁 , > Bruce Korb > > Referring to > : > > An obvious problem with the patch is that it considers a file name to be a > byte sequ

Re: uuencode: multi-bytes char in remote file name contains bytes >0x80

2011-07-03 Thread Bruno Haible
Referring to : An obvious problem with the patch is that it considers a file name to be a byte sequence. But different users may work in different locales, with different encodings. If a Chinese user with file names in GB18030

Re: uuencode: multi-bytes char in remote file name contains bytes >0x80

2011-07-03 Thread Bruce Korb
On 07/03/11 04:14, 張叁 wrote: my code is just showing my meaning. may not works well. Hi Duhuanpeng, RE: enhancement to have uuencode encode output file name: A few other things that will be needed: 1. changes to mark the file name as an encoded file name 2. parallel changes to uudecode tha