Skip to content

newlocale use appears incorrect per man page; fails with Emscripten #1329

@jason-ha

Description

@jason-ha

scoped_c_thread_locale::c_locale() contains the line

*clocale = newlocale(LC_ALL, "C", nullptr);

This fails use with Emscripten (v1.39.8) as null is returned when category_mask is LC_ALL.
newlocal man page compared with _create_locale(LC_ALL, a few lines above and _create_locale docs suggest that LC_ALL_MASK is the proper category_mask argument:

*clocale = newlocale(LC_ALL_MASK, "C", nullptr);

History shows this call, once added (Steve Gates 8/28/2014), was always this way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions