简体   繁体   English

Ruby Gem IMGKit Unicode问题

[英]Ruby Gem IMGKit Unicode Issue

I have a question to ask you. 我有一个问题要问你。 I have a problem with IMGKit. 我的IMGKit有问题。 when I save the file to image file with unicode language it does not support. 当我使用unicode语言将文件保存到图像文件时,它不支持。 like Thailand language when render from thailand website it does not support thailand language and other unicode language. 如泰国语言,当从泰国网站进行渲染时,它不支持泰国语言和其他unicode语言。 why ? 为什么呢?

You really need to give more details with your question. 您确实需要提供有关问题的更多详细信息。

I've installed IMGKit 1.3.6, obtained the wkhtmltoimage 0.10.0 binary from google-code and ran the following in my terminal: 我已经安装了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)>

The output (while not perfect) renders Thai correctly - http://i.stack.imgur.com/IhJPY.jpg 输出(虽然不是很完美)可以正确呈现泰语-http: //i.stack.imgur.com/IhJPY.jpg

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

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