[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: google-translate
From: |
Emanuel Berg |
Subject: |
Re: google-translate |
Date: |
Sat, 19 Sep 2015 17:03:57 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Ian Zimmerman <itz@buug.org> writes:
>> (loop for trans-pair in '(("\345" "å") ("\344"
>> "ä") ("\366" "ö") ) do
>
> That looks like an encoding mismatch, not like
> a bug. I bet these byte values are the latin-1 codes
> for these letters.
Now we have left the bug discussion and this is an
issue of my interface. But it may still be of interest
to the writer of google-translate because I didn't
find such an interface to begin with (of course,
otherwise I wouldn't have written mine). What I want,
and now have, is really simple:
M-x sv RET ord RET
echos
ord: word
and ditto English to Swedish. For additional languages
a less streamlined interface is OK since I do that
much less.
As for the quoted Elisp, without it, the string
"reader" is translated/displayed "l\344sare" and not
"läsare". And the same for the other chars.
>> (defun translate (src-lang dst-lang text)
>> (interactive)
>> (let ((killed kill-ring))
>> (google-translate-translate src-lang dst-lang text 'kill-ring)
>> (let ((translation (string-make-unibyte (current-kill 0))))
> ^^^^^^^^^^^^^^^^^^^
> Why do you do that? That may be your problem
> right there.
BRB.
--
underground experts united
http://user.it.uu.se/~embe8573
- Re: Is it possible to transform text before feeding it to ispell?, (continued)
- Re: Is it possible to transform text before feeding it to ispell?, Tassilo Horn, 2015/09/08
- google-translate (was: Re: Is it possible to transform text before feeding it to ispell?), Emanuel Berg, 2015/09/08
- Re: google-translate (was: Re: Is it possible to transform text before feeding it to ispell?), Andrey Tykhonov, 2015/09/09
- Re: google-translate (was: Re: Is it possible to transform text before feeding it to ispell?), Emanuel Berg, 2015/09/09
- Re: google-translate, Emanuel Berg, 2015/09/15
- Re: google-translate, Alex Kost, 2015/09/16
- Re: google-translate, Emanuel Berg, 2015/09/16
- Re: google-translate, Emanuel Berg, 2015/09/17
- Re: google-translate, Emanuel Berg, 2015/09/18
- Re: google-translate, Ian Zimmerman, 2015/09/19
- Re: google-translate,
Emanuel Berg <=
- Re: google-translate, Emanuel Berg, 2015/09/19
Re: Is it possible to transform text before feeding it to ispell?, Michael Heerdegen, 2015/09/08
Re: Is it possible to transform text before feeding it to ispell?, Eli Zaretskii, 2015/09/08