简体   繁体   中英

Ruby Gem IMGKit Unicode Issue

I have a question to ask you. I have a problem with IMGKit. when I save the file to image file with unicode language it does not support. like Thailand language when render from thailand website it does not support thailand language and other unicode language. 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:

[~]$ 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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