summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.74.0/src/unicode.h
blob: e9cbd97c0ff4e158383f1ebe31aedf1b1b4600cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
 * @file unicode.h
 * prototypes for unicode.c
 *
 * @author  Ben Gardner
 * @license GPL v2+
 */

#ifndef UNICODE_H_INCLUDED
#define UNICODE_H_INCLUDED

#include "uncrustify_types.h"


void write_bom(void);


/**
 * @param ch the 31-bit char value
 */
void write_char(int ch);


void write_string(const unc_text &text);


//! Figure out the encoding and convert to an int sequence
bool decode_unicode(const std::vector<UINT8> &in_data, std::deque<int> &out_data, char_encoding_e &enc, bool &has_bom);


void encode_utf8(int ch, std::vector<UINT8> &res);


#endif /* UNICODE_H_INCLUDED */