Determining the current charset

Hi all,

What’s the best way to determine the current charset, i.e., the value I
need to give to Iconv as the ‘to’ encoding so that converted characters
display correctly on the terminal?

My current best guess is: locale -c LC_CTYPE|head -6|tail -1.

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