File: unicode.h

package info (click to toggle)
simutrans 111.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 13,504 kB
  • ctags: 12,645
  • sloc: cpp: 101,849; ansic: 3,466; makefile: 694; sh: 44
file content (19 lines) | stat: -rw-r--r-- 406 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef UNICODE_H
#define UNICODE_H

#include <stddef.h>

typedef unsigned char  utf8;
typedef unsigned short utf16;

size_t utf8_get_next_char(const utf8 *text, size_t pos);
long utf8_get_prev_char(const utf8 *text, long pos);

utf16 utf8_to_utf16(const utf8 *text, size_t *len);
int	utf16_to_utf8(utf16 unicode, utf8 *out);

// returns latin2 or 0 for error
utf8 unicode_to_latin2( utf16 chr );


#endif