-
-
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
Invalid UTF-8 byte at index 1: 0x65 #1831
Comments
Can you provide example code? Is the string |
Here is the function I am getting exception thrown: |
It seems that the literal "Çevrimiçi" is not encoded in UTF-8. Can you try this: for (int c : message)
{
std::cout << "character: " << std::hex << c << std::endl;
} to show the full encoded values in the string `message´? If it's UTF-8, it should be something like
|
character : ffffffc7 |
When I define it like u8"Çevrimiçi" i get |
However when i use j.dump() now the message is with different characters(A with ~ ın tıo and something that looks like a cross instead of Ç). I assume this is due to Visual Studio? |
The u8 version looks right. |
Do you need further assistance with this issue? |
No, thanks for asking. Weird characters at debug screen was a Visual Studio problem. It works fine now. |
I want to serialize an object that has a string with "Çevrimiçi" in it. When I try to j.dump() I am getting an exception (json.exception.type_error.316)
I have tried to set compiler option /utf-8 and source/execution_charset to utf_8.
I saved all my files with encoding utf-8
windows 10
MSVC 19.20.27508
latest release version
The text was updated successfully, but these errors were encountered: