Handle UTF-8 paths correctly on Windows platform (#9443)

* Fix round-trip serialization with UTF-8 paths

* Add compiler version check

* Add comment to C API functions

* Add Python tests

* [CI] Updatre MacOS deployment target

* Use std::filesystem instead of dmlc::TemporaryDirectory
This commit is contained in:
Philip Hyunsu Cho
2023-08-07 23:27:25 -07:00
committed by GitHub
parent 97fd5207dd
commit 7ce090e775
6 changed files with 48 additions and 18 deletions

View File

@@ -1221,7 +1221,7 @@ XGB_DLL int XGBoosterPredictFromCudaColumnar(BoosterHandle handle, char const *v
* \brief Load model from existing file
*
* \param handle handle
* \param fname File URI or file name.
* \param fname File URI or file name. The string must be UTF-8 encoded.
* \return 0 when success, -1 when failure happens
*/
XGB_DLL int XGBoosterLoadModel(BoosterHandle handle,
@@ -1230,7 +1230,7 @@ XGB_DLL int XGBoosterLoadModel(BoosterHandle handle,
* \brief Save model into existing file
*
* \param handle handle
* \param fname File URI or file name.
* \param fname File URI or file name. The string must be UTF-8 encoded.
* \return 0 when success, -1 when failure happens
*/
XGB_DLL int XGBoosterSaveModel(BoosterHandle handle,