0

i have some code that sends me to a url website and the url has a username and password variables in it. when the username and password are in english it works well and it signs the user in. (for example http://mywebsite.example?username=john&password=qwerty)

but when i send the variables in hebrew (in my case) i get an error saying incorrect URL or login info. (for example http://mywebsite.example?username=ראובןהגבר&password=qwerty)

At first I tried to encode the username in UTF-8 so it matches the website encoding but that didn't work. what is the problem and how can i fix it? Thanks

Itay S
  • 73
  • 7
  • Are you typing the URLs into the browser address bar or are you using some library in a script? – lenz Aug 15 '18 at 08:24
  • 1
    [This](https://en.wikipedia.org/wiki/Percent-encoding) is what you need to use, but it's hard to tell you how to do it without knowing what exactly you're trying to do. – lenz Aug 15 '18 at 08:27
  • @lenz typing them into the address bar – Itay S Aug 15 '18 at 08:53
  • Okay, URL-encoding by hand is like calculating square roots with your mind only. It's no fun for most people. And it's not really about programming. – lenz Aug 15 '18 at 11:41
  • But I'm curious: how did you encode the username with UTF-8? Or what did you try there? – lenz Aug 15 '18 at 11:42

0 Answers0