Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

(PDB-2940) fix utf8 handling #60

Merged

Conversation

wkalt
Copy link

@wkalt wkalt commented Aug 19, 2016

Remove beautician dependency and pass pretty-printed output from the API
straight to stdout. This simplifies the code a bit and gets us around a
beautician bug that caused us to mishandle UTF8 in CLI results.


while reader.read(&mut buf).unwrap() != 0 {
writer.write(&mut buf);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're wanting to do something like

let stdout = io::stdout();
let mut handle = stdout.lock();
io::copy(&mut res, &mut handle).ok().expect("failed to write response");

And you could wrap the resp in a BufReader if you wanted!

Remove beautician dependency and pass pretty-printed output from the API
straight to stdout. This simplifies the code a bit and gets us around a
beautician bug that caused us to mishandle UTF8 in CLI results.
@wkalt wkalt force-pushed the maint/stable/pdb-2940-fix-utf8-handling branch from 173379f to 3ed4bd0 Compare August 22, 2016 18:07
@ajroetker ajroetker merged commit 1cccae2 into puppetlabs:stable Aug 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants