more dummies

just to sketch out the final implementation
This commit is contained in:
Frank
2025-11-19 18:04:09 +01:00
parent 55c9741f01
commit 8219feb41e
2 changed files with 13 additions and 2 deletions

View File

@@ -5,13 +5,20 @@
// translates the next unicode UTF-8 item to 2-byte "code points" (reduced UTF-16)
uint16_t unicodeToWchar16(const char* utf8, size_t maxLen) {
// to be implemented
// TODO: implement proper UTF8 → reduced UTF16 decoding
(void)utf8;
(void)maxLen;
return 0; // sentinel: "no character"
}
// returns a pointer to the next unicode item - can be used to "advance" conversion after unicodeToWchar16()
// return nullptr at end of input
const char* nextUnicode(const char* utf8, size_t maxLen) {
// to be implemented
(void)maxLen;
if (!utf8) return nullptr;
if (strlen(utf8)>0) return utf8+1;
else return nullptr; // last code read
// TODO: implement proper UTF8 iteration
}
#endif