我有个问题要问你。我对IMGKit有个问题。当我用unicode语言将文件保存到图像文件时,它不支持。像泰语一样,当从泰国网站渲染时,它不支持泰语和其他unicode语言。为什么?
发布于 2012-06-01 10:09:36
你真的需要在你的问题中提供更多的细节。
我已经安装了IMGKit 1.3.6,从google-code获得了wkhtmltoimage 0.10.0二进制文件,并在我的终端上运行了以下代码:
[~]$ irb
1.9.2p320 :001 > require 'IMGKit'
=> true
1.9.2p320 :002 > kit = IMGKit.new('http://www.thairath.co.th/')
=> #<IMGKit:0x007ff56295a6a0 @source=http://www.thairath.co.th/, @stylesheets=[], @options={}>
1.9.2p320 :003 > file = kit.to_file('/Users/ashleyconnor/Desktop/thairath.jpg')
=> #<File:/Users/ashleyconnor/Desktop/thairath.jpg (closed)>输出(虽然不完美)正确地呈现泰语- http://i.stack.imgur.com/IhJPY.jpg
https://stackoverflow.com/questions/9769078
复制相似问题