We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75b992f commit 4730d45Copy full SHA for 4730d45
src/base64/base64.rs
@@ -142,6 +142,7 @@ fn decode(input: &mut Reader, ignore_garbage: bool) {
142
fn encode(input: &mut Reader, line_wrap: uint) {
143
let b64_conf = base64::Config {
144
char_set: base64::Standard,
145
+ newline: base64::LF,
146
pad: true,
147
line_length: match line_wrap {
148
0 => None,
@@ -159,9 +160,8 @@ fn encode(input: &mut Reader, line_wrap: uint) {
159
160
// However, since GNU base64 outputs only LF (presumably because that is
161
// the standard UNIX line ending), we strip CRs from the output to maintain
162
// compatibility.
- let output = encoded.replace("\r", "");
163
164
- println(output.as_slice());
+ println(encoded.as_slice());
165
}
166
167
fn help(progname: &str, usage: &str) {
0 commit comments