summaryrefslogtreecommitdiff
path: root/src/dged/utf8.h
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2025-11-26 23:34:08 +0100
committerAlbert Cervin <albert@acervin.com>2025-11-26 23:34:08 +0100
commitf06d8923e86a2af70f9c97f8484dc9e645dcefdb (patch)
treea2fce0ab790dda09bfb33544622f65d7953fc898 /src/dged/utf8.h
parentb8f2c54675cfd4c89c13941503fb23eda0ad082d (diff)
downloaddged-f06d8923e86a2af70f9c97f8484dc9e645dcefdb.tar.gz
dged-f06d8923e86a2af70f9c97f8484dc9e645dcefdb.tar.xz
dged-f06d8923e86a2af70f9c97f8484dc9e645dcefdb.zip
Handle unicode chars when unescaping JSON
The python LSP used some nbsp unicode chars when sending back documentation.
Diffstat (limited to 'src/dged/utf8.h')
-rw-r--r--src/dged/utf8.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dged/utf8.h b/src/dged/utf8.h
index 150fe02..b91e7fd 100644
--- a/src/dged/utf8.h
+++ b/src/dged/utf8.h
@@ -2,6 +2,7 @@
#define _UTF8_H
#include <stdbool.h>
+#include <stddef.h>
#include <stdint.h>
struct codepoint {
@@ -35,4 +36,6 @@ bool utf8_byte_is_unicode_continuation(uint8_t byte);
bool utf8_byte_is_unicode(uint8_t byte);
bool utf8_byte_is_ascii(uint8_t byte);
+size_t utf8_encode(uint32_t codepoint, uint8_t buf[4]);
+
#endif