#encoding 5 articles
- Export-Csv -Encoding UTF8 flips the BOM between 5.1 and 7gotchas / powershellSame parameter, different bytes; Excel reads encoding from the BOM, so the report is readable on one machine and mojibake on the next
- A $filter literal encoded twice finds nothing — with a 200gotchas / rest-apiIf a helper already percent-encodes the quoted literal, wrapping the whole $filter in encodeURIComponent encodes the value a second time (/ → %252F, @ → %2540); SharePoint then compares against the escaped text and…
- Comparing SharePoint URLs — decode both sides first, then prefix-match on boundariesgotchas / searchNormalize encoding + boundary-aware prefix, or matches never fire
- PowerShell 7 treats typographic quotes as string delimitersgotchas / powershell„/" parse like "; localized text in single-quoted here-strings
- Windows PowerShell 5.1 Get-Content/Set-Content mangles UTF-8 — á becomes ágotchas / powershellANSI default double-encodes diacritics; non-ASCII in the pattern makes -replace match nothing and exit 1. Use System.IO.File + BOM-less UTF8Encoding, check git status after a failed run