Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix changing locale. #5314

Merged
merged 3 commits into from
Feb 17, 2020
Merged

Fix changing locale. #5314

merged 3 commits into from
Feb 17, 2020

Conversation

trivialfis
Copy link
Member

Fixes #5313

Don't do anything special if the original locale is classic. I'm not sure if it's a quality fix, as the default global locale in Python is utf-8 while C in c++. However changing locale in c++ also changes locale in Python ... So they have different getters but same setter..

As number parsing is implemented in house, we don't need locale.
@trivialfis
Copy link
Member Author

Update: Just don't set the locale, as number parsing is implemented in XGBoost.

@trivialfis trivialfis merged commit e433a37 into dmlc:master Feb 17, 2020
@trivialfis trivialfis deleted the fix-locale branch February 17, 2020 04:51
trivialfis added a commit that referenced this pull request Feb 17, 2020
* Fix changing locale.

* Don't use locale guard.

As number parsing is implemented in house, we don't need locale.

* Update doc.
@hcho3 hcho3 mentioned this pull request Feb 17, 2020
12 tasks
@lock lock bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Saving pkl model changes default encoding
2 participants