ede/eiconman/Utf8.h
Sanel Zukan 1781407ef0 Added some basic UTF-16 to UTF-8 code. Works nicely with mozilla/seamonkey
clipboard, but messes everything else. More work, more work...
Also added terminating char when strncpy is used. I miss that strlcpy...
2007-07-30 12:46:37 +00:00

14 lines
329 B
C

#ifndef __UTF8_H__
#define __UTF8_H__
// 'to' must be at least 5 bytes long
int utf16_to_utf8(unsigned int from, char* to);
// 'to' must be at least len * 5 long
int utf16_to_utf8_str(unsigned short* from, int len, char* to);
// check if characters are in UTF-16 encoding
bool is_utf16(unsigned short* from, int len);
#endif