2021-08-15 23:05:24 -04:00
|
|
|
/* utf8.h -- conversion between unicode and UTF-8 */
|
2021-08-12 23:06:58 -04:00
|
|
|
#ifndef _UTF8_H_
|
|
|
|
#define _UTF8_H_
|
2012-07-10 19:21:35 -04:00
|
|
|
|
2015-02-08 01:26:07 -05:00
|
|
|
typedef unsigned int unicode_t ;
|
2012-07-10 19:21:35 -04:00
|
|
|
|
2021-08-14 21:41:35 -04:00
|
|
|
int _utf8_width( unicode_t c) ; /* straight width */
|
|
|
|
int utf8_width( unicode_t c) ; /* workaround width */
|
2019-08-12 21:14:08 -04:00
|
|
|
unsigned utf8_to_unicode( const char *line, unsigned index, unsigned len,
|
2015-02-08 01:26:07 -05:00
|
|
|
unicode_t *res) ;
|
2019-08-12 09:41:51 -04:00
|
|
|
unsigned utf8_revdelta( unsigned char *buf, unsigned pos) ;
|
2015-02-08 01:26:07 -05:00
|
|
|
unsigned unicode_to_utf8( unicode_t c, char *utf8) ;
|
2012-07-10 19:21:35 -04:00
|
|
|
|
|
|
|
#endif
|
2021-08-12 23:06:58 -04:00
|
|
|
/* end of utf8.h */
|