Ruby Gem IMGKit Unicode Issue



我有个问题要问你。我对IMGKit有意见。当我用unicode语言将文件保存到图像文件时,它不支持。与泰国语言一样,当从泰国网站渲染时,它不支持泰国语言和其他unicode语言。为什么?

您确实需要提供问题的更多细节。

我已经安装了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)>

输出(虽然不完美)正确呈现泰语-https://i.stack.imgur.com/IhJPY.jpg

最新更新