Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unicode: accept char16_t, char32_t sequences #1298

Closed
igoloe opened this issue Oct 15, 2018 · 3 comments
Closed

unicode: accept char16_t, char32_t sequences #1298

igoloe opened this issue Oct 15, 2018 · 3 comments
Labels
state: needs more info the author of the issue needs to provide more details

Comments

@igoloe
Copy link

igoloe commented Oct 15, 2018

  • Describe the feature in as much detail as possible.
    it woudl be nice, if the lib can accept any char16_t and char32_t sequences and convert them to utf8 automatically, because most unicode strings in windows would be stored as u16string (non legacy code ofc) to distinguish it from ansi like in std::string. List of sequence like usage (maybe incomplete): charT*, charT[], basic_string, basic_string_view where charT from {char16_t,char32_t}
  • Include sample usage where appropriate.
    any usage of unicode in a type safe manner in c++ under windows (explicitly exlcuding std::wstring)
@nlohmann
Copy link
Owner

With "accept", I assume you do not mean parsing (the library already supports parsing from std::u16string), but assignments, right?

@igoloe
Copy link
Author

igoloe commented Oct 17, 2018

As with release 3.1.2 there was no support as arguments of json ctor for char16_t[] and char16_t* or u16string and u16string_view. First one was interpreted as array of values, other ones were rejected by compiler. I am not sure, if this changed in 3.3 already.
Requesting support for char32_t was just for logical completeness.
If the lib already supports construction, then please reject my request and i will test again with the latest version.

@nlohmann
Copy link
Owner

If possible, please provide concrete examples.

@nlohmann nlohmann added the state: needs more info the author of the issue needs to provide more details label Oct 18, 2018
@nlohmann nlohmann closed this as completed Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: needs more info the author of the issue needs to provide more details
Projects
None yet
Development

No branches or pull requests

2 participants