-
Notifications
You must be signed in to change notification settings - Fork 53
silgy_convert
Jurek Muszyński edited this page May 14, 2019
·
3 revisions
Converts NULL-terminated src from cp_from to cp_to using iconv library. Maximum destination length, including terminating NULL can be 1024 bytes.
Returns pointer to converted, zero-terminated static string.
// convert UTF-8 string to plain ASCII
char plain[1024];
strcpy(plain, silgy_convert(string, "UTF-8", "ASCII//TRANSLIT"));
Requires ICONV compilation switch.