mirror of
https://git.telodendria.io/Telodendria/Cytoplasm.git
synced 2025-04-25 02:16:03 +00:00
Fix Unicode handling in Json, don't sign-extend bytes in Stream.
This commit is contained in:
parent
e557de8d9d
commit
c4121d2dba
4 changed files with 88 additions and 23 deletions
|
@ -39,14 +39,21 @@
|
|||
* is a standard library header.
|
||||
*/
|
||||
|
||||
#include <Int.h>
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
/**
|
||||
* Take a UTF-8 codepoint and encode it into a string buffer containing
|
||||
* Convert UTF-16 into a Unicode codepoint.
|
||||
*/
|
||||
extern UInt32 StrUtf16Decode(UInt16, UInt16);
|
||||
|
||||
/**
|
||||
* Take a Unicode codepoint and encode it into a string buffer containing
|
||||
* between 1 and 4 bytes. The string buffer is allocated on the heap,
|
||||
* so it should be freed when it is no longer needed.
|
||||
*/
|
||||
extern char * StrUtf8Encode(unsigned long);
|
||||
extern char * StrUtf8Encode(UInt32);
|
||||
|
||||
/**
|
||||
* Duplicate a null-terminated string, returning a new string on the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue