fixed repl internal encoding