Notepad3: URL Encode/Decode problem

Created on 10 Jan 2020  路  5Comments  路  Source: rizonesoft/Notepad3

URL Encode

According RFC 3986 all reserved characters !#$%&'()*+,/:;=?@[] must be encoded.
Notepad3's result after encoding is !%23$%25%26'()*+,%2F:;=%3F@%5B%5D
Correct result is %21%23%24%25%26%27%28%29%2A%2B%2C%2F%3A%3B%3D%3F%40%5B%5D

You can test with urlencoder.org

URL Decode

It duplicates decoded data and adds wrong characters between.

Try to decode correct result from above. Result is:
Notepad3_2020-01-10_15-38-47

Simple test:
Notepad3_2020-01-10_15-36-55

change request 馃悶 bug

Most helpful comment

Fantastic fix!

All 5 comments

Notepad3 uses Win32 API function UrlEscape() for this purpose.
Unfortunately, the RFC 3986 specification is used with flag URL_ESCAPE_ASCII_URI_COMPONENT, which is available only for Win8 and later.
As we want to keep Win7 comatibility, we can not use this flag here.
As a solution, we had to implement own conversion routines 馃

(The duplicate, e.g. "Simple Test" is a bug)

UrlEscape() has parameter URL_ESCAPE_SEGMENT_ONLY which can convert more characters maybe.

@alexantr : URL_ESCAPE_SEGMENT_ONLY is already used 馃槈

Hello @alexantr ,

Feel free to test the BETA version "Notepad3Portable_5.20.113.2703_BETA.paf.exe.7z" or higher.
See "Notepad3 BETA-channel access #1129" or here Notepad3Portable_5.20.113.2703_BETA.paf.exe.7z.

Note: "Notepad3Portable BETA" can be used in "2 flavors" (with or without the extension ".7z").

Your comments and suggestions are always welcome... 馃槂

Fantastic fix!

Was this page helpful?
0 / 5 - 0 ratings