title: Cannot send special characters via jQuery ajax
body: <p>I am developing a webpage where user is searching for files using tags.
  I am using jQuery Ajax to do the remote call to the API (database).
  It all works fine when I use non special characters like a-z but fails when using for example åäö.</p>
  
  <p>On the serverside I am using PHP. I print the tag to see if it "arrives" and all a-z works fine but the åäö is not displaying at all. They seem to not "arrive".</p>
  
  <p>What can be wrong?</p>
  
  <p>This is my jQuery code:</p>
  
  <pre><code>var tags = $('#tags').val();
  
  $.ajax ({
      type: "POST",
      url: base_url + "search", 
      data: "tags=" + tags + "&amp;limit=" + limit, 
      beforeSend: function (html) {
              $("#search_results").html("Searching for files...");
      },
      success: function (html) {
              $("#search_results").html(html);
      },
      error: function (html) {
              $("#search_results").html('Something went wrong!');
      }
  });
  </code></pre>
  
  <p>This is my server side code:</p>
  
  <pre><code>echo ($_POST['tags']);
  </code></pre>
  
  <p>I search and looked at related questions about this here on SO but non helped me unfortunately.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Using this solved it! Works fine now.</p>
  
  <pre><code>{tags: encodeURIComponent(tags), limit: limit}
  </code></pre>