title: Get-ChildItem and non-breaking space
body: <p>While working on my file servers, I have noticed one strange folder that broke my script. Folder has name consisting of only one character with ascii value 160 (<a href="https://en.wikipedia.org/wiki/Non-breaking_space" rel="noreferrer">non-breaking space</a>, NBSP). Visually that name is the same as space character.</p>
  
  <p>Briefly, I have <code>Get-ChildItem</code> being executed on this folder and it is entering endless loop. Command is in reality executed against parent folder and it returns again problematic folder, so my script got into endless loop.</p>
  
  <p>You can easily simulate this on your own environment. In <code>C:\temp</code> folder create new folder whose name consists only of NBSP. You can type that with holding alt and pressing 0160 on numerical keyboard. After creating it, run</p>
  
  <pre><code>Get-ChildItem C:\Temp\ -Recurse
  </code></pre>
  
  <p>you will get endless list of folders without name, although I have only that one folder.</p>
  
  <pre><code>d-----        6/15/2017   2:20 PM
  d-----        6/15/2017   2:20 PM
  d-----        6/15/2017   2:20 PM
  d-----        6/15/2017   2:20 PM
  d-----        6/15/2017   2:20 PM
  . . .
  </code></pre>
  
  <p>I tested this with PowerShell 4 and 5, on Server and Client OS and its the same behavior. Command <code>Get-Item</code> is having also issue with this name, and both switches <code>-Path</code> and <code>-LiteralPath</code> are behaving in the same way. I tried also <code>[System.IO.Directory]</code> class, but it was having the same issue.</p>
  
  <p><strong>Question:</strong> I have updated my script to report folders with this name as an error and skip it, but I am wondering is there some more smart way to do it? My goal would be to run <code>Get-ChildItem</code> or equivalent against such folder. </p>
  
  <p>Is this a known issue? Would be be worth reporting it somewhere as a bug, if confirmed by more people? </p>