Skip to content

setlocale( LC_ALL, "") changes the locale for the entire application #770

Closed
@dinghram

Description

@dinghram

In tidylib.c:
TY_(tidySetLanguage)( setlocale( LC_ALL, "") );

The purpose of this line, as far as I can tell, is not to change the application locale, but only to query it. However, that is not what happens. Rather, it changes the behavior of the entire application to the point where my customers in Europe could not enter floating point values as they were parsed incorrectly after this call that I did not expect to find in a 3rd party library.

From the documentation, if you want to query the locale without changing it:

If locale is a null pointer, setlocale queries the current C locale without modifying it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions