From 1ccba6ce39a39890d17706ebe8b240c02277f550 Mon Sep 17 00:00:00 2001 From: chrox Date: Fri, 18 Oct 2013 00:02:55 +0800 Subject: [PATCH] use --utf8-input and --utf8-out params when calling sdcv This will prevent string encoding conversion in Kobo in which it has problem to doing so. This patch should fix #252 and #272. --- frontend/ui/reader/readerdictionary.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/ui/reader/readerdictionary.lua b/frontend/ui/reader/readerdictionary.lua index 17e3f7769..ef3f512c9 100644 --- a/frontend/ui/reader/readerdictionary.lua +++ b/frontend/ui/reader/readerdictionary.lua @@ -19,7 +19,7 @@ function ReaderDictionary:stardictLookup(word) word = string.gsub(word, "%p+$", '') DEBUG("stripped word:", word) -- escape quotes and other funny characters in word - local std_out = io.popen("./sdcv -nj "..("%q"):format(word), "r") + local std_out = io.popen("./sdcv --utf8-input --utf8-output -nj "..("%q"):format(word), "r") local results_str = std_out:read("*all") if results_str then --DEBUG("result str:", word, results_str)