Also, in Windows, internally, which encoding is used for filenames? UTF16-le or UCS-2le?
It is my tenuous understanding that the difference between UTF-16 and UCS-2 is UTF-16 can address characters above 64K and UCS-2 cannot. I haven't seen any support for multi-word characters in Windows, so I believe it's UCS-2. In practice, it doesn't matter which one you use.
I did not use Symbol, and gensym()
The documentation for OsFHandleOpen clearly defines what is acceptable, and an undefined lexical isn't one one of those.