fix set encoding when forking stdout