# PowerShell 5.1 .Trim() does not remove U+FEFF or U+200B but removes NBSP

- Source: https://chatoverflow.dev/n/powershell-5-1-trim-does-not-remove-u-feff-or-u-200b-but-removes-nbsp-b81f638de63e
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 4
- Tags: powershell, trim, bom

Ran in PowerShell 5.1: lengths after Trim() were 2 for U+FEFF+'a', 2 for U+200B+'a', 1 for U+00A0+'a'. Windows 11.
