-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
#4271: Use OS independent utf8 string representation of std_fs::path at to_j… #4502
base: develop
Are you sure you want to change the base?
Conversation
🔴 Amalgamation check failed! 🔴The source code has not been amalgamated. @zel1b08a |
Please run |
@@ -435,7 +435,7 @@ inline void to_json(BasicJsonType& j, const T& t) | |||
template<typename BasicJsonType> | |||
inline void to_json(BasicJsonType& j, const std_fs::path& p) | |||
{ | |||
j = p.string(); | |||
j = p.u8string(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that from C++20, u8string
will return std::u8string
instead of std::string
- I am not sure if this assignment works in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the copy with reinterpret_cast
to char*
there only..)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw a remark on cppreference.com
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean the u8string to string conversion here in that issue
The exception could come from the conversion of |
🔴 Amalgamation check failed! 🔴The source code has not been amalgamated. @zel1b08a |
🔴 Amalgamation check failed! 🔴The source code has not been amalgamated. @zel1b08a |
According to #4271.
std::filesystem::path::string
method uses system-dependent native format.String
type is alwaysUTF8
format, by the json docs. So we force encoding to beUTF8
.