-
My data:
My code: json j;
try {
j = json::parse(tmp);
} catch (json::parse_error &e) {
logger->Error("json error, JNIEXPORT jstring JNICALL Java_tech_eritquearcus_miraicp_CPP_1lib_Event");
logger->Error(j.dump());
logger->Error(e.what());
APIException("JSON error").raise();
return returnNull();
} The error log:
And I believe that the problem is in the message "\xb0\xa1", which is encoding from Chinese text, because when this message change to acsii code, this error will not happen.
What should I do to fix this error? |
Beta Was this translation helpful? Give feedback.
Answered by
nlohmann
May 17, 2021
Replies: 1 comment 3 replies
-
The library only supports UTF-8. Please make sure your input is encoded in UTF-8. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
Nambers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The library only supports UTF-8. Please make sure your input is encoded in UTF-8.