2012-03-19 71 views
0

我有个问题想问你。我对IMGKit有问题。当我用unicode语言将文件保存到图像文件时,它不支持。像泰国语言,当从泰国网站呈现时,它不支持泰语和其他unicode语言。为什么?Ruby Gem IMGKit统一码编号

回答

0

你真的需要给你的问题更多的细节。

我已经安装了IMGKit 1.3.6,获得从谷歌代码的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