lidavidm commented on code in PR #4006:
URL: https://github.com/apache/arrow-adbc/pull/4006#discussion_r2825645081
##########
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:
Talking about the Python side. I'm assuming this should not be converting to
str, but should be using bytes?
https://github.com/apache/arrow-adbc/blob/7b38cf4543330592a40a5023b4e6b93f8f34d7ff/python/adbc_driver_sqlite/adbc_driver_sqlite/__init__.py#L63-L93
--
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]