繁体   English   中英

Ruby Gem IMGKit Unicode问题

[英]Ruby Gem IMGKit Unicode Issue

我有一个问题要问你。 我的IMGKit有问题。 当我使用unicode语言将文件保存到图像文件时,它不支持。 如泰国语言,当从泰国网站进行渲染时,它不支持泰国语言和其他unicode语言。 为什么呢?

您确实需要提供有关问题的更多详细信息。

我已经安装了IMGKit 1.3.6,从Google代码获取了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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM