Encoding need for Google API
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I'm trying to use my script to automatically using Google translate APIs from Arabic to english. Here is the code.
mytext = {some text in Arabic}
url = 'http://translate.google.com/translate_t';
page = urlread(url, 'get' ,{'v', '1.0','ie', 'UTF8','oe', 'UTF8','q', native2unicode(mytext,'utf8'), ...'langpair', ['ar' '|' 'en']});
Now I've tried using various encodings for mytext, including unicode, utf-8 but it never works. and the text send to Google API as ????? .Any idea if I need any codec?
0 comentarios
Respuestas (1)
Walter Roberson
el 8 de Jun. de 2011
5.3 You agree not to access (or attempt to access) any of the Services by any means other than through the interface that is provided by Google, unless you have been specifically allowed to do so in a separate agreement with Google. You specifically agree not to access (or attempt to access) any of the Services through any automated means (including use of scripts or web crawlers) and shall ensure that you comply with the instructions set out in any robots.txt file present on the Services.
3 comentarios
Walter Roberson
el 9 de Jun. de 2011
If you try to do something you are prohibited from doing and it fails, then inquiring as to how to get around the technical problem is not the correct approach.
I believe you should be going back to the googleapis version.
Ver también
Categorías
Más información sobre Google en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!