You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
prpr ce1b447c99 Fix length bug and size warning 2 months ago
.gitignore Initial commit 5 years ago
LICENCE Initial commit 5 years ago
Makefile Do not convert existing UTF-8 sequences 5 years ago Reduce size of section headers. 5 years ago
charset.h Small c with cedilla should be 0xe7 3 years ago
test.c fix return value to reflect final string length 5 years ago
xconv.c Fix length bug and size warning 2 months ago
xconv.h use size_t as return type 5 years ago


Lightweight ISO-6937 to UTF-8 conversion library.


size_t xconv(char *inbuf, char *outbuf, size_t outbuflen);


The xconv() function converts a sequence of characters in ISO-6937 encoding to UTF-8.

If a UTF-8 sequence is found within the input string, processing is aborted.


On successful conversion, the xconv() function returns the number of characters placed into outbuf excluding the string terminator.

If no conversion is necessary (plain ASCII input string or a UTF-8 sequence was found) then the function returns 0. In this case, the state of the output buffer is undefined and it should not be used.


This library was written to replace iconv() for a specific conversion task in a small embedded environment with little memory or CPU time available.