Get-InstalledApplication function issue

Hello

The function mentioned in the subject (Get-InstalledApplication), line 2237:
$appDisplayName = $regKeyApp.DisplayName -replace ‘[^\u001F-\u007F]’,’’

This removes unicode characters that should be there. This is the function output:

DisplayName : Adobe Acrobat Reader DC - Franais

This is the correct display name:

image

Toolkit Version: 3.8.4

That line was added because of this:

.
Comment out that line to see if it works for you.

Personally I would have swapped the accents out (ç → c) but that’s more code.

According to this: https://www.unicode.org/charts/PDF/U0000.pdf
control characters are 00 → 1F + 7F

I’m not sure the existing code replaces only 2 characters or a range.

If you can figure out code will leave the accent characters in and not break the function, you should try to file a bug report (or I can do it for you) and include your new code.

I understand. OK, I’ll have a look and see if I can find a solution.
Will keep you updated here.

1 Like

I have a possible solution:

The code is:
-replace “[^\p{L}\p{Nd}\p{Z}\p{P}]”,’’

The inspiration:
Regex Tutorial - Unicode Characters and Properties (regular-expressions.info)

I created issue #691

Please tell me if the last line of code is accurate.

Thanks.
Yes, the code is accurate:
-replace “[^\p{L}\p{Nd}\p{Z}\p{P}]”,’’

1 Like