I stopped program with pry, then I type
[1] pry(Module1::Class1)> Encoding.default_external => #<Encoding:Windows-1252> In another mac, default value of Encoding.default_external is UTF-8. I changed locale variables to UTF-8, and encoding in irb works fine, but not in project stopped. With byebug is the same.
System is macOSX, ruby 2.3.3 through rbenv.