From 3691194b357aa5a045f8f87658150670834f45c2 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 18 Jan 2012 09:02:21 -0500 Subject: [PATCH] g_base64_encode_step: clarify break_lines behavior a bit break_lines uses LFs, not CRLFs like you might expect (since it's designed for email-related use), but we can't change that now since the caller has to allocate the output buffer and so the number-of-bytes-output is part of the ABI. So, just document that. https://bugzilla.gnome.org/show_bug.cgi?id=668158 --- glib/gbase64.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/glib/gbase64.c b/glib/gbase64.c index d3c26a2..5839936 100644 --- a/glib/gbase64.c +++ b/glib/gbase64.c @@ -81,6 +81,9 @@ static const char base64_alphabet[] = * @break_lines is typically used when putting base64-encoded data in emails. * It breaks the lines at 72 columns instead of putting all of the text on * the same line. This avoids problems with long lines in the email system. + * Note however that it breaks the lines with LF + * characters, not CR LF sequences, so the result cannot + * be passed directly to SMTP or certain other protocols. * * Return value: The number of bytes of output that was written * -- 2.7.4