When using the names
for an encoding instance, a list of the name and aliases of the encoding is returned.
Encoding::encoding_instance.names
The value returned is an array containing the names and aliases of the encoding.
# get names and aliases of some encodings puts "#{Encoding::UTF_16.names}" puts "#{Encoding::ISO_8859_1.names}" puts "#{Encoding::Windows_1250.names}"
names
property of the Encoding
class instances. Then we print the values to the console.RELATED TAGS
CONTRIBUTOR
View all Courses