开发者

invalid multibyte char (US-ASCII) MAC OSX RUBY on Rails Without magic enconding?

开发者 https://www.devze.com 2023-04-09 10:39 出处:网络
On ruby 1.8.7 I had no problems with swedish chars ÅÄÖ but now on ruby 1.9.2 this exception comes up. Strangley enough it does not appear on my Ubuntu machine.

On ruby 1.8.7 I had no problems with swedish chars ÅÄÖ but now on ruby 1.9.2 this exception comes up. Strangley enough it does not appear on my Ubuntu machine.

Can it be fixed without M开发者_运维问答agic encoding or putting #encoding utf-8 on top of every ruby file with Swedish chars?


Looks like there is no solution to avoid this Error without adding encoding line

Add "# coding: utf-8" to all files


Hmm, try to add this

export LC_ALL="en_US.UTF-8"

to your ~/.profile, ~/.bash_profile or equivalent. It worked here!

0

精彩评论

暂无评论...
验证码 换一张
取 消