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

Float number and date parsing may fail in different countries #6

Open
nussbaumer-planb opened this issue Jul 5, 2024 · 0 comments
Open

Comments

@nussbaumer-planb
Copy link

nussbaumer-planb commented Jul 5, 2024

Problem: The float number and date parsing may fail in other countries, that is: where a system locale is set that is not English.
The reason for that is that you use the StrToFloat variant without the TFormatSettings parameter (two locations in TOMLParser.pas). This variant uses the system locale which may or may not match the TOML specification.

Solution: change these two code locations to use the StrToFloat variant that takes a second parameter of type TFormatSettings and specify settings that you created explicitly, e.g. by calling TFormatSettings.Create('en-US').

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