[issue30103] uu package uses old encoding

2017-05-02 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue30103] uu package uses old encoding

2017-05-02 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 13f1f423fac39f8f14a3ce919dd236975517d5c6 by Xiang Zhang in branch 'master': bpo-30103: Allow Uuencode in Python using backtick as zero instead of space (#1326) https://github.com/python/cpython/commit/13f1f423fac39f8f14a3ce919dd236975517d5c6

[issue30103] uu package uses old encoding

2017-04-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm +0 for something containing "space" in the option name since the purpose of changing the UU encoding is avoiding stripping spaces. But this is not strong preference. Actually there is no need to add a new option in b2a_uu(), since we can just use

[issue30103] uu package uses old encoding

2017-04-28 Thread Martin Panter
Martin Panter added the comment: I think I would prefer b2a_uu(data, grave=True), but am also happy with Xiang’s backtick=True if others prefer that. :) In my mind “grave accent” is the pure ASCII character; it just got abused for other things. Other options: b2a_uu(data, space=False)

[issue30103] uu package uses old encoding

2017-04-28 Thread Xiang Zhang
Xiang Zhang added the comment: token defines it as backquote. But in doc there are also several places calling it backticks[1][2]. Do you have any preference Serhiy and Martin? [1] https://docs.python.org/release/3.0.1/whatsnew/3.0.html#removed-syntax [2]

[issue30103] uu package uses old encoding

2017-04-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Python 2 used the term "backquote" when ` is a language part. -- ___ Python tracker ___

[issue30103] uu package uses old encoding

2017-04-28 Thread Xiang Zhang
Xiang Zhang added the comment: I think "grave accent" is not suitable. Although it's the standard unicode name but it's not commonly used in programming so not direct enough. "backquote" and "backtick" seems could be used interchangeably I don't have any preference. Perl seems to use backtick

[issue30103] uu package uses old encoding

2017-04-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Martin and Xiang. Wikipedia is not a reliable source, but it usually is based on reliable sources. In this case seems it is wrong. The next question is about parameter name. The Wikipedia uses the name "grave accent", the manpage of FreeBSD uuencode

[issue30103] uu package uses old encoding

2017-04-27 Thread Xiang Zhang
Xiang Zhang added the comment: Uuencode has no official standards and it all depends on the implementation. For other languages, I could only find PHP, java, activetcl? have official implementation. PHP and activetcl defaults to backticks and no options. Java defaults to spaces and no

[issue30103] uu package uses old encoding

2017-04-27 Thread Martin Panter
Martin Panter added the comment: FWIW I am using NXP LPC microcontrollers at the moment, whose bootloader uses the grave/backtick instead of spaces. (NXP application note AN11229.) Although in practice it does seem to accept Python's spaces instead of graves. I wouldn't put too much weight

[issue30103] uu package uses old encoding

2017-04-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What about other popular languages? Java, PHP, Ruby, Tcl, C#, JavaScript, Swift, Go, Rust? Do any languages provide a way for configuring zero character and what are the names of the options? Are there languages that use "`" instead of a space only for

[issue30103] uu package uses old encoding

2017-04-27 Thread Xiang Zhang
Xiang Zhang added the comment: There seems no standard. I also read the wikipedia but for perl and uuencode on my Linux, they now all use backticks to represent zero instead of spaces. [~]$ perl -e 'print pack("u","Ca\x00t")' $0V$`=``` [~]$ cat /tmp/test Ca[~]$ uuencode /tmp/test - begin 664 -

[issue30103] uu package uses old encoding

2017-04-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is there any standard? >From Wikipedia [1]: """ Note that 96 ("`" grave accent) is a character that is seen in uuencoded files but is typically only used to signify a 0-length line, usually at the end of a file. It will never naturally occur in the actual

[issue30103] uu package uses old encoding

2017-04-27 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1437 ___ Python tracker ___ ___

[issue30103] uu package uses old encoding

2017-04-27 Thread Xiang Zhang
Xiang Zhang added the comment: Looks like perl has already encoded in this way: [~]$ perl -e 'print pack("u","Ca\x00t")' $0V$`=``` > Oddly, the uu.decode function does properly decode files encoded using "`", > but encode is unable to create them. The decoder source code explicitly states it

[issue30103] uu package uses old encoding

2017-04-19 Thread R. David Murray
Changes by R. David Murray : -- type: behavior -> enhancement versions: +Python 3.7 -Python 3.4 ___ Python tracker ___

[issue30103] uu package uses old encoding

2017-04-19 Thread R. David Murray
Changes by R. David Murray : -- components: +Library (Lib) -Extension Modules ___ Python tracker ___

[issue30103] uu package uses old encoding

2017-04-19 Thread Kyle Glowacki
New submission from Kyle Glowacki: Looking in the man pages for the uuencode and uudecode (http://www.manpagez.com/man/5/uuencode/), I see that the encoding used to go from ascii 32 to 95 but that 32 is deprecated and generally newer releases go from 33-96 (with 96 being used in place of 32).