URLEncode() fails on extended ASCII characters

To my chagrin, I failed to test the output of the URLEncode() function built-in to SEOTools. :frowning:

URLEncode() only correctly encodes the low-bit characters on the ASCII character map (characters 32 through 126). After that it chokes, outputting the Unicode “replacement character” (%EF%BF%BD, which is: ïżœ).

Fortunately Excel 2013’s built-in EncodeURL() function does work correctly, so I have a workaround, but it would be nice to get this fixed. (I’m surprised this wasn’t noticed before.)

In a related vein, HTMLEncode() works fine on the the full ASCII character set. But it fails on unicode characters. Further, with a few exceptions, it usually won’t output character entities, just the numeric HTML escape characters. (It will output ÿ, not ÿ)

See:

I’m running:

  • Version 7.0.8 of SEOTools.
    • I checked 7.0.11.0_20170409. Still broken.
  • Microsoft Office Home and Student 2013, Version: 15.0.4927.1002.
  • Windows 10 Pro, Version 1607, Build 14393.1198
  • 64-bit operating system, x64-based processor

Rich »∔«

Thank you for noticing this. I'll report to Niels.

1 Like

I've fixed so UrlEncode and UrlDecodes defaults to UTF32 in next version. Will look into HtmlEncode as well.

1 Like

Found a solution for HtmlEncode as well to support full unicode character table.

2 Likes

Good to know, thanks!

Rich »∔«