![](/img/trans.png)
[英]Ruby IO redirection to a file by using Kernel.puts,How can I ensure that the stored file's encoding type is ANSI or UTF-8
在 windows: visual studio 代碼 IDE 中,我寫了這樣的命令: ruby -E UTF-8 -e "puts '湯姆,歡迎來到我家'" > test.txt ,然后我使用命令: ruby -E UTF-8 -e "puts gets" < test.txt ...