Skip to content

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

@nussbaumer-planb

Description

@nussbaumer-planb

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').

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions