NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I am doing a request using jQuery:

$.get("" +
      searchValue + "&accept-language=hebformat=json&polygon='true'",
      {}, function (data)

where searchValue is the text string which I want to search for.

With Firefox this works perfectly and I am getting a JSON result and everything running smoothly. My application is nearly finished and I decided to run this on IE but I found that the request takes a lot of time and instead of getting a JSON result I get an error back.

What I can about this?

asked 31 Aug '10, 15:29

ItayEng's gravatar image

accept rate: 0%

retagged 31 Aug '10, 17:17

twain's gravatar image


Nominatim expects parameters to be UTF-8 encoded and generates errors if the encoding is invalid.

Firefox correctly encodes parameters using UTF-8 encoding by default, but Internet Explorer doesn't, so you will need to explicitly encode it using the encodeURIComponent function. This will also work in Firefox and should work in other browsers.

$.get("" +
      encodeURIComponent(searchValue) + 
      {}, function (data){});

You should also ensure that your page uses a UTF-8 encoding so that results can be properly displayed. This can be done by adding using a suitable meta tag in your <head> block:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
permanent link

answered 31 Aug '10, 16:50

twain's gravatar image

accept rate: 40%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 31 Aug '10, 15:29

question was seen: 13,738 times

last updated: 01 Sep '10, 07:23

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum