CUBRID Engine  latest
unicode_support.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Search Solution Corporation
3  * Copyright 2016 CUBRID Corporation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 /*
20  * unicode_support.c : Unicode characters support
21  */
22 #ifndef _UNICODE_SUPPORT_H_
23 #define _UNICODE_SUPPORT_H_
24 
25 #include "config.h"
26 
27 #include <stdio.h>
28 #include <stdlib.h>
29 #include <string.h>
30 #include <time.h>
31 #include <assert.h>
32 
33 
34 typedef unsigned int uint32;
35 typedef unsigned short int uint16;
36 typedef unsigned char uchar;
37 
38 #ifdef __cplusplus
39 extern "C"
40 {
41 #endif
42  extern int unicode_process_alphabet (LOCALE_DATA * ld, bool is_verbose);
43  extern int unicode_process_normalization (LOCALE_DATA * ld, bool is_verbose);
44  extern void unicode_free_data (void);
45 #if !defined (SERVER_MODE)
46  extern bool unicode_string_need_compose (const char *str_in, const int size_in, int *size_out,
47  const UNICODE_NORMALIZATION * norm);
48  extern void unicode_compose_string (const char *str_in, const int size_in, char *str_out, int *size_out,
49  bool * is_composed, const UNICODE_NORMALIZATION * norm);
50  extern bool unicode_string_need_decompose (const char *str_in, const int size_in, int *decomp_size,
51  const UNICODE_NORMALIZATION * norm);
52  extern void unicode_decompose_string (const char *str_in, const int size_in, char *str_out, int *size_out,
53  const UNICODE_NORMALIZATION * norm);
54 #endif
55  extern int string_to_int_array (char *s, uint32 * cp_list, const int cp_list_size, const char *delims);
56 
57 #ifdef __cplusplus
58 }
59 #endif
60 
61 #endif /* _UNICODE_SUPPORT_H_ */
int unicode_process_alphabet(LOCALE_DATA *ld, bool is_verbose)
bool unicode_string_need_decompose(const char *str_in, const int size_in, int *decomp_size, const UNICODE_NORMALIZATION *norm)
int unicode_process_normalization(LOCALE_DATA *ld, bool is_verbose)
bool unicode_string_need_compose(const char *str_in, const int size_in, int *size_out, const UNICODE_NORMALIZATION *norm)
int string_to_int_array(char *s, uint32 *cp_list, const int cp_list_size, const char *delims)
void unicode_compose_string(const char *str_in, const int size_in, char *str_out, int *size_out, bool *is_composed, const UNICODE_NORMALIZATION *norm)
unsigned short int uint16
static void str_out(const char *fmt,...)
unsigned char uchar
unsigned int uint32
void unicode_free_data(void)
void unicode_decompose_string(const char *str_in, const int size_in, char *str_out, int *size_out, const UNICODE_NORMALIZATION *norm)