#1 2019-03-20 10:02:02

damiand
Member
From: Greece
Registered: 2018-09-21
Posts: 94

UrlEncode results depend on Delphi versions

The following statement:

UTF8ToString(UrlEncode(StringToUTF8('https://test3.diavgeia.gov.gr/doc/Ω74ΔΡΩ2-15Δ')));

in Delphi 6 produces:

https://test3.diavgeia.gov.gr/doc/%CE%A974%CE%94%CE%A1%CE%A92-15%CE%94

and in Delphi XE:

https%3A%2F%2Ftest3.diavgeia.gov.gr%2Fdoc%2F%CE%A974%CE%94%CE%A1%CE%A92-15%CE%94

Why?  hmm

Offline

#2 2019-03-20 11:19:09

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: UrlEncode results depend on Delphi versions

This does not make any sense.
Either the whole text is encoded, or none.

I am not able to reproduce the issue.
See https://synopse.info/fossil/info/ffc2f95b89

Windows 10 64bit (10.0.17134) (cp1252)
    4 x Intel(R) Core(TM) i7-3517U CPU @ 1.90GHz (x86)
Using mORMot 1.18.5119
    TSQLite3LibraryStatic 3.27.2 with internal MM
Generated with: Delphi 6 32 bit compiler

Time elapsed for all tests: 1m44
Performed 2019-03-20 12:18:09 by User

Online

#3 2019-03-22 11:45:28

damiand
Member
From: Greece
Registered: 2018-09-21
Posts: 94

Re: UrlEncode results depend on Delphi versions

ab wrote:

I am not able to reproduce the issue.

Strange, I've cross checked it in my computer and the result in Delphi 6 is different, as I wrote above. OS is Microsoft Windows 7 Professional 64 bits, Service Pack 1.

Offline

Board footer

Powered by FluxBB