Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 317985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:31:41+00:00 2026-05-12T08:31:41+00:00

I am using google’s translate API to translate some text in the iPhone SDK.

  • 0

I am using google’s translate API to translate some text in the iPhone SDK. The URL I use is http://ajax.googleapis.com/ajax/services/language/translate?v=1.0

Everything works, except in some languages, Polish for example, the returned string sometimes have weird things like \u0026 as part of the string. It would show as “hello how ar\u0026e you”. Why is this? The way I fetch for the result is as follows:

    NSData *returnData = [NSURLConnection sendSynchronousRequest: req returningResponse: response error: error];
    NSString *new = [[NSString alloc] initWithData:responseData encoding: NSUTF8StringEncoding];

Is the encoding incorrect? Is that why the new string appears to be incorrect? I’ve tried the same text int he google translate webpage and it gets translated correctly.


UPDATE

If you simply go to this URL, you will see the special characters. How do I correctly represent those characters in my app? Using the two lines of code above will not encode it correctly.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T08:31:41+00:00Added an answer on May 12, 2026 at 8:31 am

    The example looks correct:

    \u0026quot;liberation\u0026quot; and \u0026quot;exit application\u0026quot;
    

    I guess is jsonEncode(htmlEncode("liberation" and "exit application"))

    If you have a proper json library then translatedText should be: ..."liberation" and "exit application"... and then you just need to pass that through a html decoder.

    \uXXXX escapes are just unicode hex escapes and should be handled by the json parser.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Am using Google API for translation on passing my request to change the text
When using Google Search the results contain full URLs. Using the Google AJAX API
When using Google Chrome, I want to debug some JavaScript code. How can I
I am using google's appengine api from google.appengine.api import urlfetch to fetch a webpage.
I'm using google docs, and some templates we are using were created using MS-Office.
Using Google App Engine SDK and Python, I'm facing an issue : I'm unable
I am using Google Maps API v3 on a website I am developing. I
I am using google search api But by default it shows 4 and maximum
I'm using Google Analytics now and it has the annoying feature of considering domain.com/
I'm making a simple page using Google Maps API 3. My first. One marker

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.