Like what? From what I've read, Windows either uses UCS2 or UTF-16. It's unclear which is actually true (and it's plausible that both are, depending on the API in question and version of Windows). If it's UCS2, then surrogate chars are invalid. If it's UTF-16, then any `str` is valid.

In any case, the next commented line says "See individual Path impls for additional restrictions". The implementation of `from_vec_unchecked` for WindowsPath documents that it may raise the `str::not_utf8` condition if the vector is not valid UTF-8.