jadenthem / google-refine

Automatically exported from code.google.com/p/google-refine
0 stars 0 forks source link

Data conversion error during translation #268

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello,

Using Refine, when I translate a column from DE to EN, it replaces "=" with 
"\u003d" 

Source Feed:       Microcon-10 kDa 8/Pk (VE=8 PCE)

Target Generated:  Microcon-10 kDa 8/Pk (VE \u003d 8 PCE)

I can see multiple instances for this issue... Any help on this is much 
appreciated. Thanks!

Original issue reported on code.google.com by jesu.lu...@gmail.com on 30 Nov 2010 at 10:28

GoogleCodeExporter commented 8 years ago
What do you mean by "translate a column from DE to EN"? How exactly do you do 
that?

Original comment by dfhu...@gmail.com on 2 Dec 2010 at 6:53

GoogleCodeExporter commented 8 years ago
Am trying to translate a a column value, from DE(German) to EN (English). While 
doing so, "=" symbol is replaced by "\u003d" and am looking to fix that issue. 

To translate, I use a code similar to the one below:

"https://www.googleapis.com/language/translate/v2?key=<key value>&q=" + 
escape(value.substring(0,50), "url") + 
"&source=de&target=en&callback=handleResponse&prettyprint=true"

Thanks for your help!

Original comment by jesu.lu...@gmail.com on 2 Dec 2010 at 11:08

GoogleCodeExporter commented 8 years ago
Jesu, that sounds like a problem with the translate service itself, not with 
Google Refine. Can you invoke such a URL directly in your browser and see what 
the result is? (I can't, because I don't have your key.)

In any case, it looks like \u003d is a JSON string encoding for Unicode 
characters. Can you use the parseJson() function to decode it?

If you're still having problem, please carry on this discussion on the mailing 
list. This is not a valid "issue".

Original comment by dfhu...@gmail.com on 2 Dec 2010 at 5:00