Replace %25 Character with %

(imported topic written by SystemAdmin)

Im trying to clean up the output of a retrieved property, how would I replace the %25 with the real char ?

so the output would be

%SystemRoot%\MEMORY.DMP

Q: if (exists value “DumpFile” of key “HKLM\SYSTEM\CurrentControlSet\Control\CrashControl” of registry) then (value “DumpFile” of key “HKLM\SYSTEM\CurrentControlSet\Control\CrashControl” of registry as string) else “”

A: %25SystemRoot%25\MEMORY.DMP%00

Q: if (exists value “DumpFile” of key “HKLM\SYSTEM\CurrentControlSet\Control\CrashControl” of registry) then substring before “%00” of (value “DumpFile” of key “HKLM\SYSTEM\CurrentControlSet\Control\CrashControl” of registry as string) else “”

A: %25SystemRoot%25\MEMORY.DMP

(imported comment written by BenKus)

Hey mamcher,

This is a bug. “%25” is actually supposed to be the “%” character, but it is not properly decoded when displayed in the console… I think this is fixed in the next version (but I will need to double-check).

Ben

Hi,

Sorry to bring this subject back to life, but it seems this has not yet been fixed.
any workarounds?

First this is an ancient post.

Second this isn’t an issue and never was, so Ben was wrong back then. If you are using FixletDebugger you can turn off the automatic percent encoding of the output in the preferences. This percent encoding is done to send answers through reports and a % will always be percent encoded to %25 during this process. This is how the client outputs its answers to the console by default as it will undo this as it places the value into the DB.

The answer shown in the Console would be percent characters as that is how it would be stored (and again it always was)

As an added piece of information all strings (like the “%00”) would have the percent encoding removed from them as they enter the evaluation and thus this would just be a null character.

2 Likes