79467227

Date: 2025-02-25 16:29:28
Score: 1
Natty:
Report link

I've found the issue - it has to do with the encoding of special characters.

My issue was with "Verfügbar, wenn online", the single reference to $odSyncedValues seems to force PowerShell to encode strings properly, while the same thing does not happen when it is referenced only in the condition?

I am still not entirely clear on how this happens, which is why I'll leave the question up for now.

But the "fix" is to do:

    $odSyncedValues = $odSyncedValues | ForEach-Object {
        [System.Text.Encoding]::UTF8.GetString([System.Text.Encoding]::Default.GetBytes($_))
    }
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: dedphish