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

Parsing of dnf.conf and repositories configuration must be locale independent #1706

Open
jrohel opened this issue Sep 18, 2024 · 0 comments
Open

Comments

@jrohel
Copy link
Contributor

jrohel commented Sep 18, 2024

Parsing of configuration files are now locale dependent - locale dependent function are used.

At least:

  • std::stod is used for log_size, bandwidth, minrate, all options using class OptionSeconds
  • std::stof for throttle

Now only the C locale is set. When the C++ locale is set, problems may occur, for example, when parsing using the >> operator.

Example of bad parsing:
The log_size = 1.6M option is not parsable in the Czech locale - Czech uses a comma (not a dot) as a decimal separator.
In log is WARNING Config error in section "main" key "log_size": Nelze převést '1.6M' na bajty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant