scdoc/src/utf8_fputch.c -rw-r--r-- 230 bytes View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
#include <stdint.h>
#include <stdio.h>
#include "unicode.h"

size_t utf8_fputch(FILE *f, uint32_t ch) {
8 references
char buffer[UTF8_MAX_SIZE]; char *ptr = buffer; size_t size = utf8_encode(ptr, ch); return fwrite(&buffer, 1, size, f); }