title: Charset fix to UTF8 - encoding/decoding values using JS/jQuery
body: <p>I have a problem with values in cookies. I am creating cookies using this code:</p>
  
  <pre><code>// var
  $firstName = $_POST['name'];
  $lastName = $_POST['sname'];
  $email = $_POST['email'];
  $phone = $_POST['tel'];
  
  setcookie("firstName", $firstName);
  setcookie("lastName", $lastName);
  setcookie("email", $email);
  setcookie("phone", $phone);
  </code></pre>
  
  <p>And filling form using this:</p>
  
  <pre><code>var fillForm = function() {
  
      firstName = getCookie('firstName');
      lastName = getCookie('lastName');
      email = getCookie('email');
      phone = getCookie('phone');
  
      $('#name-input').val(firstName);
      $('#name2-input').val(lastName);
      $('#email-input').val(email);
      $('#phone-input').val(phone);
  }
  </code></pre>
  
  <p>And my problem is that, when the user writes the name <code>Łukasz</code> or normal email <code>some.email@domain.com</code>, cookie values are in this format: name <code>%C5%81ukasz</code> and email <code>some.email%40domain.com</code>.</p>
  
  <p>I tried to use decoding and encoding functions from Stack Overflow but the best result I receive from the input <code>%C5%81</code> is the letter <code>Å</code>(ASCII) but I need to get <code>Ł</code> (UTF8).</p>