{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreibniopzvoa6lsmqd2r6aphnjznsdx4yqgiql77ry2ieeuofkhxsdi",
"uri": "at://did:plc:lk3jfj3zq4k4wxnk474axylu/app.bsky.feed.post/3mp4say4cj5f2"
},
"path": "/t/model-returning-malformed-characters-in-json-response-using-api/1343471#post_11",
"publishedAt": "2026-06-25T15:17:22.000Z",
"site": "https://community.openai.com",
"tags": [
"GPT-4o returning malformed Unicode like \\u0000e6 instead of æ — encoding bug?",
"Bugs",
"@OpenAI_Support",
"@OpenAIAPIhelper"
],
"textContent": "I believe that it’s due to a restriction in OpenAI’s endpoint, which does not allow unicode escape sequences, except those for control characters.\n\nGPT-4o returning malformed Unicode like \\u0000e6 instead of æ — encoding bug? Bugs\n\n> We did an investigation and are confident that it is not from the tokenizer/tokenization. Instead, the endpoints seem to ban the generation of escaped Unicode sequence, other than control characters (0x0000-0x001f and 0x007f). But this is an undocumented behaviour, we still need confirmation from @OpenAI_Support @OpenAIAPIhelper Three things to work this around now: → Set ensure_ascii=False in your Python json.dumps() calls; → Remove \\uXXXX examples from your prompts; → Avoid asking to gener…",
"title": "Model returning malformed characters in JSON response using API"
}