pitrou commented on code in PR #2918:
URL: https://github.com/apache/arrow-adbc/pull/2918#discussion_r2126582287


##########
c/driver_manager/adbc_driver_manager.cc:
##########
@@ -114,7 +129,175 @@ struct OwnedError {
   }
 };
 
+std::filesystem::path UserConfigDir() {
+  std::filesystem::path config_dir;
+#if defined(_WIN32)
+  auto dir = std::getenv("AppData");

Review Comment:
   Since this is dealing with filesystem paths, I would recommend that you use 
the Unicode API functions (either `_wgetenv` or `GetEnvironmentVariableW`) and 
then encode to utf8.
   
   Generally I think you should use the convention that `std::string` and 
`std::string_view` paths on Windows are utf8-encoded. If you use the bytewise 
("ASCII") APIs provided by Windows, they use the current codepage which is 
brittle and limited (it cannot represent everything).



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to