diff options
author | Fred Drake <fdrake@acm.org> | 2001-09-28 16:01:46 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-09-28 16:01:46 (GMT) |
commit | b387860c70a783599a4111180b0812fb72723608 (patch) | |
tree | e59e14a75986b3fd4b43997c0daffa21efbd106f /Doc | |
parent | ce608b02a69384d6c99466c8855ad62bbe097acf (diff) | |
download | cpython-b387860c70a783599a4111180b0812fb72723608.zip cpython-b387860c70a783599a4111180b0812fb72723608.tar.gz cpython-b387860c70a783599a4111180b0812fb72723608.tar.bz2 |
State that encode() and encodestring() append a newline to the input data
if it does not already end with a newline.
This fixes SF bug #463330.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libbase64.tex | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Doc/lib/libbase64.tex b/Doc/lib/libbase64.tex index a9adff0..24700ce 100644 --- a/Doc/lib/libbase64.tex +++ b/Doc/lib/libbase64.tex @@ -40,13 +40,18 @@ Encode the contents of the \var{input} file and write the resulting base64 encoded data to the \var{output} file. \var{input} and \var{output} must either be file objects or objects that mimic the file object interface. \var{input} will be read until -\code{\var{input}.read()} returns an empty string. +\code{\var{input}.read()} returns an empty string. If the last input +character is not a newline (\code{'\e n'}), a newline will be added to +the input data. \end{funcdesc} \begin{funcdesc}{encodestring}{s} Encode the string \var{s}, which can contain arbitrary binary data, and return a string containing one or more lines of -base64 encoded data. +base64-encoded data. If the last character of \var{s} is not a +newline (\code{'\e n'}), a newline will be added. This causes +\code{encodestring('hello!')} to return the same value as +\code{encodestring('hello!\e n')}. \end{funcdesc} |