amoeba commented on code in PR #4006:
URL: https://github.com/apache/arrow-adbc/pull/4006#discussion_r2825636920
##########
c/driver_manager/adbc_driver_manager_test.cc:
##########
@@ -797,6 +797,48 @@ TEST_F(DriverManifest, LoadNonAsciiPath) {
UnsetConfigPath();
}
+// Test loading a driver DLL with a path that contains non-ASCII chars
+// See https://github.com/apache/arrow-adbc/issues/3970
+TEST_F(DriverManifest, LoadDriverDllFromNonAsciiPath) {
+ // Create a directory with original characters from the issue (项目 =
"project")
+#ifdef _WIN32
+ std::filesystem::path non_ascii_dir = temp_dir / L"\u9879\u76ee";
+#else
+ std::filesystem::path non_ascii_dir = temp_dir / "\u9879\u76ee";
+#endif
+ std::filesytem::create_directories(non_ascii_dir);
+
+ // Create a dummy driver DLL, we'll just check th error message later to
confirm
+ std::filesystem::path test_file = non_ascii_dir / "dummy.dll";
+ std::ofstream(test_file) << "not a real DLL";
+
+ // Create a UTF-8 encoded string to simulate what Python or another caller
would
+ // pass
Review Comment:
Is there a codepath I'm not seeing where we use a `Path` object? I'm
assuming that's what you're referring to when you say paths are bytestrings.
All I see are `str` involved in the code paths here and I guess I'm assuming
those turn into UTF-8 encoded `const char*` on the C side... I'll look again
tomorrow
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]