lidavidm commented on code in PR #4006:
URL: https://github.com/apache/arrow-adbc/pull/4006#discussion_r2825616044


##########
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:
   Paths should be bytestrings (with some restrictions), so if Python provided 
UTF-8 that we have to decode into the native codepage, then presumably Python 
should've provided the raw bytestring in the first place



-- 
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]

Reply via email to