summaryrefslogtreecommitdiff
path: root/server.rb
diff options
context:
space:
mode:
Diffstat (limited to 'server.rb')
-rwxr-xr-xserver.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/server.rb b/server.rb
index 2112638..86fc53f 100755
--- a/server.rb
+++ b/server.rb
@@ -119,7 +119,7 @@ get '/next' do
STDERR.write "[dtrain] > asking to translate: '#{msg}'\n"
env[:dtrain][:socket].send msg
STDERR.write "[dtrain] waiting for translation ...\n"
- transl = env[:dtrain][:socket].recv.encode "UTF-8"
+ transl = env[:dtrain][:socket].recv.force_encoding "UTF-8"
STDERR.write "[dtrain] < received translation: '#{transl}'\n"
"#{source}\t#{transl}"
end