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

  • Home
  • SEARCH
  • 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 5974379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:56:06+00:00 2026-05-22T20:56:06+00:00

Try: http://maps.googleapis.com/maps/api/geocode/json?address =Őrbottyán,Hungary&sensor=true On an iPhone 4 & simulator, -(void)requestFailed:(ASIHTTPRequest *)request { NSLog(@geocode fail

  • 0

Try: http://maps.googleapis.com/maps/api/geocode/json?address=Őrbottyán,Hungary&sensor=true

On an iPhone 4 & simulator,

 -(void)requestFailed:(ASIHTTPRequest *)request {
   NSLog(@"geocode fail code: %d",[request responseStatusCode]);
   NSLog(@"geocoding failed: %@",[request responseString]);
}
2011-06-01 11:36:27.343 app[1174:307] geocode fail code: 0
2011-06-01 11:36:27.345 app[1174:307] geocoding failed: (null)

In a browser I get:

   "results" : [
    {
    "address_components" : [
        {
           "long_name" : "Őrbottyán",
           "short_name" : "Őrbottyán",
           "types" : [ "locality", "political" ]
        },
        {
           "long_name" : "Pest",
           "short_name" : "Pest",
           "types" : [ "administrative_area_level_1", "political" ]
        },
        {
           "long_name" : "Hungary",
           "short_name" : "HU",
           "types" : [ "country", "political" ]
        }
     ],
     "formatted_address" : "Őrbottyán, Hungary",
     "geometry" : {
        "bounds" : {
           "northeast" : {
              "lat" : 47.7138950,
              "lng" : 19.34353090
           },
           "southwest" : {
              "lat" : 47.63339999999999,
              "lng" : 19.2051070
           }
        },
        "location" : {
           "lat" : 47.6846190,
           "lng" : 19.2883260
        },
        "location_type" : "APPROXIMATE",
        "viewport" : {
           "northeast" : {
              "lat" : 47.7138950,
              "lng" : 19.34353090
           },
           "southwest" : {
              "lat" : 47.63339999999999,
              "lng" : 19.2051070
           }
        }
     },
     "types" : [ "locality", "political" ]
  }

],
“status” : “OK”
}

Other requests with standard English characters in them DO work and return correctly on the device.

  • 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-22T20:56:07+00:00Added an answer on May 22, 2026 at 8:56 pm

    At some point in your code you’re probably using the NSURL class, and:

    The NSURL class will fail to create a
    new NSURL object if the path being
    passed is not well-formed—the path
    must comply with RFC 2396. Examples of
    cases that will not succeed are
    strings containing space characters
    and high-bit characters. Should
    creating an NSURL object fail, the
    creation methods return nil, which you
    must be prepared to handle.

    You need to convert the high-bit characters in “Őrbottyán” into percent escapes, using [NSString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding], before passing the string to NSURL. Modern browsers will silently make this conversion for you when you put a non-compliant string into the URL field, but in code you have to do it explicitly.


    Edit to include quantumpotato’s findings below: Google Maps will do the right thing if “Őrbottyán” is converted to “Orbottyan” (a “lossy” conversion to ASCII encoding), and that conversion can be performed with a round-trip through NSData:

    NSData *data = [urlString dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
    NSString *dataString = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding];
    NSURL *url = [NSURL URLWithString:dataString];
    [dataString release];
    

    I suspect “lossy conversion to ASCII” may not work with all websites, but it’s been tested and verified with Google Maps, so there you have it. 🙂

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

Sidebar

Related Questions

If I put this URL: http://maps.googleapis.com/maps/api/geocode/json?address=la%20coru%C3%B1a,%20la%20coru%C3%B1a,%20espa%C3%B1a&sensor=false&region=es I get this json object: { results :
the google maps API require parameters like this : NSString *urlString=@http://maps.google.com/maps?saddr=43.2923,5.45427&daddr=43.4697,5.65427; [[UIApplication sharedApplication]openURL:[NSURL URLWithString:urlString]];
When I try to use curl or file_get_contents to read something like http://example.com/python/json/ from
When I try to do a file(' http://somewebsite.com ') i get an error URL
I try to fetch a Wikipedia article with Python's urllib: f = urllib.urlopen(http://en.wikipedia.org/w/index.php?title=Albert_Einstein&printable=yes) s
Here are my classes: http://pastebin.com/3dc5Vb1t When I try to run BookStore b = new
I've recently started looking at the Google Maps API to try out something new
i am trying to run google map tutorial using following link http://mobiforge.com/developing/story/using-google-maps-android followed all
I am following this tutorial step by step http://code.google.com/apis/maps/articles/phpsqlajax.html . Actually I copy pasted
I'm using Google Maps API on my web page. I'm try to add multiple

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.