fix(lib) use stdin encoding instead of preferred encoding