Files
2026-04-29 11:44:36 +02:00

16 lines
408 B
C

#ifndef CHARSET_H
#define CHARSET_H
#include <stddef.h>
/*
* Convert input (UTF-8, UTF-16 with BOM, or ISO-8859-1) to ISO-8859-1.
* Unmappable characters (> U+00FF) are replaced with '?'.
* Returns number of bytes written (excluding null terminator).
* Output is always null-terminated.
*/
int to_iso8859_1(const unsigned char *in, size_t in_len,
char *out, size_t out_size);
#endif