Skip to content

text_serializer is still not 100% locale indenpendent. PFA patch with the fix #509

@ashish-250

Description

@ashish-250

text_serializer.cc-> Serialize api is still not fully locale independent even after temporarily switching the locale config of the ostream. The double values still react to the global locale settings as the library is using std::snprintf to convert double to char array before writing it to the ostream. this method call is not affected by what locale is set to be used by ostream. I have attached a diff which achieves same formatting of double as snprintf's "%.*g", std::numeric_limits::max_digits10 - 1
Please find the attached patch that we used for this fix: locale-0.12.3.patch.zip

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