SDL_INVALID_UNICODE_CODEPOINT(3)
π SDL_INVALID_UNICODE_CODEPOINT π
okay so bestie, welcome to the SDL3 FUNCTIONS manual, and today's main character is literally just a lil macro that holds the Unicode REPLACEMENT CHARACTER codepoint. yes, that one. the "something went wrong but we're being polite about it" character. iconic behavior tbh π
β¨ NAME β¨
SDL_INVALID_UNICODE_CODEPOINT β the Unicode REPLACEMENT CHARACTER codepoint. that's it. that's the whole job. she's a constant, she's lowkey famous, she's giving "i contain multitudes (of broken bytes)" π
π¦ SYNOPSIS π¦
#include <SDL3/SDL_stdinc.h>
#define SDL_INVALID_UNICODE_CODEPOINT 0xFFFD
no cap, that's the entire vibe. one include, one define, zero drama. π«Ά
πΈ DESCRIPTION πΈ
so when SDL_StepUTF8() and SDL_StepBackUTF8() are out here doing their lil walks through a UTF-8 string and they hit encoding errors, they don't just ghost you β they report this codepoint. like, "hey bestie, something's wrong with the bytes, here's the replacement character, carry on." π
and here's the fun part: this tends to render as something like a question mark in most places. so if you've ever seen a mysterious ? where a letter should be, congrats, you've met her. it's giving mystery, it's giving chaos, it's giving unreadable text energy π
β AVAILABILITY β
this macro is available since SDL 3.2.0. so if you're on anything older, she simply has not made her debut yet. respect the timeline bestie π°οΈβ¨
π SEE ALSO π
go read those too, they're the ones actually doing the stepping and reporting. this macro is just the codepoint they point at. iykyk π
and that's the whole page, no notes π brought to you by Simple Directmedia Layer, version SDL 3.4.18. mwah, go forth and handle your encoding errors with grace, bestie ππ¦β¨
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms