sb-posix should use _wstat instead of _stat on Windows
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
New
|
Undecided
|
Unassigned |
Bug Description
If Unicode support is enabled, sb-posix:stat fails with Unicode filenames on Windows. After some digging in SBCL source code/ MSFT documentations, I have found that calling foreign function _wstat instead of _stat does the trick.
See: https:/
Reference for _stat, _wstat: http://
I used the following code to define sb-posix::wstat which I had to use in my code instead of sb-posix:stat.
(sb-posix:
Which is a rather hacky workaround, so it would be nice if SBCL supported this out of the box.
To reproduce run (sb-posix:stat "some filename containing unicode characters")
I was using Windows threaded build "1.1.4.
description: | updated |
Poster Grue on u/lisp on Reddit requests this bug be fixed.
https:/ /www.reddit. com/r/lisp/ comments/ 9s6nen/ sbcl_1413_ released/ e92nb4k/ ?context= 3
"May I suggest this one? It seems easy to fix, but would be a huge win."