-
-
Notifications
You must be signed in to change notification settings - Fork 56
"IO error: Failed to create dir: Invalid argument" when having non-latin characters in folder name (only on windows) #40
Comments
Tried const leveldown = require("leveldown")
const path = require("path")
leveldown(path.resolve(__dirname, '中文')).open(function (res) {
debugger
}) |
Found a similar issue in a rust-rocksdb binding. Maybe we can do something like this PR in node binding file for this issue? |
Not exactly sure where the problem lies. Since it works on leveldown and rocksdb basically is a fork of that, there is either some differences in that layer or in the native lib itself. I took a quick glance at |
I'm not a c++ programmer, but it looks like rocksDB use string dir_name = "中文";
_mkdir(dir_name.c_str()); // wont work string dir_name = "中文";
_wmkdir(utf8_to_utf16(dir_name).c_str()); // it's works! hope that'll be helpful, sorry I'm not familiar with this part. |
I'm right now wondering if the rocksdb lib should be compiled with Unicode enabled (UNICODE=true or similar) because I think that string is just a placeholder |
RocksDB decided not to fix this: facebook/rocksdb#3408 (comment). Tagging with |
Update (facebook/rocksdb#3408 (comment)):
So we can tackle this once #143 lands. |
Mac works fine, only happened on Windows.
The text was updated successfully, but these errors were encountered: