Skip the replacement if a stream is set, because the Windows Console bug only appears when printing to screen.
Remove the incorrect fix for encoding issue at youtube_stdout.
Detect the encoding of stdout, and filter output according to this encoding.
Skip the filtering for all non-stdout stream.
Generalize the overload of print. It now supports different streams, and filter out the unprintable characters at the last stage.