We can use the list
property of the Encoding
class to know the encodings present in our computer system. This property displays a long list of encodings loaded on our computer.
Encoding.list
A list of encodings present in our system is presented.
puts Encoding.list
Line 1: We list the encodings present in this current system environment using the list
property of the Encoding
class. We then display the output using the puts
functionality.