How to obtain the default encoding of system?

a script run on linux or windows, i want to know the encoding of system,
order to ouput suitable string.thanks

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs