Subject: bug#26372: Base64 inserts newline [was "Base64 inserts carriage return"]

From: Assaf Gordon <[email-masked]>
Date: Wed, 5 Apr 2017 11:55:25 -0400

Hello,

On 04/05/2017 07:35 AM, Goulven Guillard wrote:
> I just figured it was not a carriage return ("\r") but a simple newline
> ("\n").  I was misleaded because for some reason my PHP form translates
> "\n" into "\r\n" during the POST submission.

While PHP and HTTP are outside the scope of GNU coreutils,
it's worth noting that the HTTP standard (which include POST
submissions) mandates "\r\n" (CR,LF) as line-endings in forms and in
headers, e.g.:

in HTTP headers:
https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html

In FORMS:
"Line breaks, as in multi-line text field values,
 are represented as CR LF pairs, i.e. `%0D%0A'."
from:  https://www.w3.org/MarkUp/html-spec/html-spec_8.html#SEC8.2.1

> Anyway, it doesn't change much the issue.

It doesn't, and the issue is still in "echo", not in "base64" :)

regards,
 - assaf