Version
v20.10.0
Platform
Microsoft Windows NT 10.0.22621.0 x64
Subsystem
node:internal/fs/promises
What steps will reproduce the bug?
run code:
import fsp from 'node:fs/promises'
async function run() {
try {
await fsp
.readdir('中文-にほんご-한글-🌕🌖🌗', {
withFileTypes: true,
encoding: 'utf-16le',
})
.catch((error) => {})
} catch (error) {}
}
run()
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior? Why is that the expected behavior?
No Error in terminal
What do you see instead?
Error in terminal:

Additional information
No response
Version
v20.10.0
Platform
Microsoft Windows NT 10.0.22621.0 x64
Subsystem
node:internal/fs/promises
What steps will reproduce the bug?
run code:
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior? Why is that the expected behavior?
No Error in terminal
What do you see instead?
Error in terminal:
Additional information
No response