diff --git a/librocksdb-sys/build.rs b/librocksdb-sys/build.rs index cfa2fec..48af659 100644 --- a/librocksdb-sys/build.rs +++ b/librocksdb-sys/build.rs @@ -171,7 +171,7 @@ fn build_rocksdb() { config.define("_MBCS", None); config.define("WIN64", None); config.define("NOMINMAX", None); - config.define("WITH_WINDOWS_UTF8_FILENAMES", "ON"); + config.define("ROCKSDB_WINDOWS_UTF8_FILENAMES", None); if &target == "x86_64-pc-windows-gnu" { // Tell MinGW to create localtime_r wrapper of localtime_s function. diff --git a/tests/test_db.rs b/tests/test_db.rs index 7aa93aa..2c08993 100644 --- a/tests/test_db.rs +++ b/tests/test_db.rs @@ -618,6 +618,23 @@ fn test_open_with_multiple_refs_as_single_threaded() { t.compile_fail("tests/fail/open_with_multiple_refs_as_single_threaded.rs"); } +#[test] +fn test_open_utf8_path() { + let path = DBPath::new("_rust_rocksdb_utf8_path_temporärer_Ordner"); + + { + let db = DB::open_default(&path).unwrap(); + + assert!(db.put(b"k1", b"v1111").is_ok()); + + let r: Result>, Error> = db.get(b"k1"); + + assert_eq!(r.unwrap().unwrap(), b"v1111"); + assert!(db.delete(b"k1").is_ok()); + assert!(db.get(b"k1").unwrap().is_none()); + } +} + #[test] fn compact_range_test() { let path = DBPath::new("_rust_rocksdb_compact_range_test");