Skip to content

Instantly share code, notes, and snippets.

View Tyzual's full-sized avatar

TyzuaL Tyzual

View GitHub Profile
@antonijn
antonijn / unicode.c
Last active September 30, 2022 01:13
UTF-8 to UTF-32 converter in C
#include "unicode.h"
#include <stdint.h>
#include <stddef.h>
int is_valid_char(uint32_t ch)
{
return ch < 0xd800 || ch > 0xdfff;
}
int is_combo_char(uint32_t ch)