stdout_to_pager: add warning to encode to utf-8 before printing

and fix the two times it is already used.