Jump to content

Cyrillic characters in URL

Recommended Posts

I use a TIdHTTPServer and have problems with decoding GET variables. 


The url in the browser looks like this (contains cyrillic characters):


Then in the RequestInfo the UnparsedParam and the QueryParams have the value  'search=%D0%90%D0%BD%D1%82%D0%BE%D0%BD&language=ru'

In DecodeAndSetParams this is parsed but I don't get the correct results:


The request comes from the browser and I didn't change any properties. So I'm not sure how to proceed. I think Indy uses the wrong encoding but I'm not aware, where I can change that? And will all browser use the same encoding? Or do I have to Parse the QueryParams myself?




Share this post

Link to post
6 hours ago, chkaufmann said:

So probably nothing changed here since 2014.

Actually, about 8 months ago, TIdHTTPServer was updated to now default to parsing input parameters using UTF-8 if no charset is specified in the Content-Type header.  I have added that note to the StackOverflow post you linked to.

Edited by Remy Lebeau

Share this post

Link to post
2 hours ago, chkaufmann said:

So this fix will be with the Indy version that comes with Delphi 11?

Yes.  Delphi 11 shipped with the latest Indy that was available 3 months ago.

  • Like 2

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now