为ruby 1.9设置全局默认编码 [英] Set global default encoding for ruby 1.9
本文介绍了为ruby 1.9设置全局默认编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想告诉红宝石,一切都是utf8,除非另有说明,所以我不必把这些#encoding:utf-8
>
I want to tell ruby that everything is utf8, except when stated otherwise, so I dont have to place these # encoding: utf-8
comments everywhere.
推荐答案
您可以:
- 设置您的RUBYOPT环境变量为-E utf-8
- 或使用 https ://github.com/m-ryan/magic_encoding
- set your RUBYOPT environment variable to "-E utf-8"
- or use https://github.com/m-ryan/magic_encoding
这篇关于为ruby 1.9设置全局默认编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文