I have wrote this following code to output aphostrophe (code 39 for utf-8):
test_utf8.rb:
puts "It\39s a wonderful life"
then ran it using:
ruby test_utf8.rb > utf8.txt
While opening in gedit it shows a box corresponding to \39. While opening in open office, it asks which encoding and after selecting utf-8 it shows it as
It#9s a wonderful life.
Why is this happening how to overcome this problem?
Thanks