Skip to content

crash on rfl::json::save() while serializing struct with std::wstring containing cyrilic and japan chars #422

@AndriyOm

Description

@AndriyOm

I have "settings " structure with std::wstring with cyrillic, japan chars in it.

struct settingsInt
{
std::wstring picture_pathname{L"Вітаю_おめでとう"};
//std::string picture_pathname_utf8; //here string as utf8 only for saving. Crashes on save with wstring. Reason: wstring path with cyrillic or japan chars.
int int_cluster_matching_width;
int int_width_divisor;
...
} settings;

Crashing on writing json file using:
rfl::json::save("settings.json"), settings, rfl::json::pretty);

For now I turned to std::string and using UTF-8 encoding to save.
Reflect CPP version from appr,. 26.04.2025

Latest VS and Win10

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