[英]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.