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.
pull/322/head
chrox 11 years ago
parent d7d2b9a20b
commit 1ccba6ce39

@ -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)

Loading…
Cancel
Save