I want to read a document file .txt in Ruby but the following lines of this document contain emojis and when i run the program it shows me different symbols and not the actual emoji. I have already tried different methods. How can i do this , should i install any gem ??
file='document.txt'
This document contains the following line with emojis
This is a test line đ„đ„đ„
File.readlines(file).each do |line|
puts line
end
Aucun commentaire:
Enregistrer un commentaire