在 ubuntu 的虚拟机里运行,AuthHash 能正常输出中文 挪到盛大云的 redhat 环境里,就不能显示中文了。都是 utf-8 环境
--- !map:OmniAuth::AuthHash
provider: weibo
uid:
info: !map:OmniAuth::AuthHash::InfoHash
nickname: "\xE8\x8B\x8F\xE6\x9D\xB0"
name: "\xE8\x8B\x8F\xE6\x9D\xB0"
location: "\xE5\x8C\x97\xE4\xBA\xAC \xE6\xB5\xB7\xE6\xB7\x80\xE5\x8C\xBA"
rails 3.1.2
omniauth (1.0.0)
omniauth-oauth (1.0.0.rc2)
omniauth-weibo (1.0.0.rc2)
class SessionsController < ApplicationController
def create
raise request.env['omniauth.auth'].to_yaml
end
protected
def auth_hash
request.env['omniauth.auth']
end
def destory
end
end