CUBRID Engine
latest
|
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "porting.h"
#include "locale_support.h"
#include "intl_support.h"
#include "language_support.h"
#include "error_manager.h"
#include "utility.h"
#include "environment_variable.h"
#include "system_parameter.h"
#include "unicode_support.h"
Go to the source code of this file.
Classes | |
struct | GENERAL_CATEGORY |
struct | CANONICAL_COMBINING_CLASS |
struct | UNICODE_CHAR |
struct | UNICODE_CP_MAPPING |
Macros | |
#define | UNICODEDATA_FILE "unicodedata.txt" |
#define | UNICODE_FILE_LINE_SIZE 512 |
#define | UNICODE_FILE_FIELDS 14 |
#define | UNICODE_FILE_GENERAL_CAT_POS 2 |
#define | UNICODE_FILE_CHAR_DECOMPOSITION_MAPPING 5 |
#define | UNICODE_FILE_UPPER_CASE_MAP 12 |
#define | UNICODE_FILE_LOWER_CASE_MAP 13 |
#define | UNICODE_DECOMP_MAP_CP_COUNT 4 |
Enumerations | |
enum | GENERAL_CATEG_ID { CAT_Cn = 0, CAT_Lu, CAT_Ll, CAT_MAX } |
Variables | |
GENERAL_CATEGORY | list_gen_cat [] |
static UNICODE_CHAR * | unicode_data = NULL |
static int | unicode_data_lower_mult = 1 |
static int | unicode_data_upper_mult = 1 |
static char | last_unicode_file [PATH_MAX] = { 0 } |
#define UNICODE_DECOMP_MAP_CP_COUNT 4 |
Definition at line 84 of file unicode_support.c.
Referenced by load_unicode_data(), and unicode_make_normalization_data().
#define UNICODE_FILE_CHAR_DECOMPOSITION_MAPPING 5 |
Definition at line 48 of file unicode_support.c.
Referenced by load_unicode_data().
#define UNICODE_FILE_FIELDS 14 |
Definition at line 44 of file unicode_support.c.
Referenced by load_unicode_data().
#define UNICODE_FILE_GENERAL_CAT_POS 2 |
Definition at line 47 of file unicode_support.c.
Referenced by load_unicode_data().
#define UNICODE_FILE_LINE_SIZE 512 |
Definition at line 43 of file unicode_support.c.
Referenced by load_unicode_data().
#define UNICODE_FILE_LOWER_CASE_MAP 13 |
Definition at line 50 of file unicode_support.c.
Referenced by load_unicode_data().
#define UNICODE_FILE_UPPER_CASE_MAP 12 |
Definition at line 49 of file unicode_support.c.
Referenced by load_unicode_data().
#define UNICODEDATA_FILE "unicodedata.txt" |
Definition at line 40 of file unicode_support.c.
Referenced by load_unicode_data(), and unicode_process_alphabet().
enum GENERAL_CATEG_ID |
Enumerator | |
---|---|
CAT_Cn | |
CAT_Lu | |
CAT_Ll | |
CAT_MAX |
Definition at line 52 of file unicode_support.c.
Definition at line 1450 of file unicode_support.c.
References UNICODE_CP_MAPPING::map.
Referenced by unicode_process_normalization().
Definition at line 1410 of file unicode_support.c.
References UNICODE_CP_MAPPING::cp, UNICODE_CP_MAPPING::map, and UNICODE_CP_MAPPING::size.
Referenced by unicode_process_normalization().
|
static |
Definition at line 997 of file unicode_support.c.
References MAX_UNICODE_CHARS, UNICODE_CHAR::unicode_mapping, and UNICODE_CHAR::unicode_mapping_cp_count.
Referenced by unicode_process_normalization().
|
static |
Definition at line 966 of file unicode_support.c.
References MAX_UNICODE_CHARS, UNICODE_CHAR::unicode_mapping, and UNICODE_CHAR::unicode_mapping_cp_count.
Referenced by unicode_process_normalization().
|
static |
Definition at line 585 of file unicode_support.c.
References assert, ER_LOC_GEN, INTL_CASING_EXPANSION_MULTIPLIER, alphabet_data::l_count, LOG_LOCALE_ERROR, alphabet_data::lower_cp, alphabet_data::lower_multiplier, MAX_UNICODE_CHARS, NO_ERROR, NULL, alphabet_data::upper_cp, and alphabet_data::upper_multiplier.
Referenced by unicode_process_alphabet().
|
static |
Definition at line 370 of file unicode_support.c.
References assert, CAT_Ll, CAT_Lu, envvar_localedatadir_file(), ER_LOC_GEN, ERR_MSG_SIZE, error(), fopen_ex(), UNICODE_CHAR::gen_cat_id, i, GENERAL_CATEGORY::id, INTL_CASING_EXPANSION_MULTIPLIER, last_unicode_file, LOG_LOCALE_ERROR, UNICODE_CHAR::lower_cp, MAX_UNICODE_CHARS, NO_ERROR, NULL, snprintf_dots_truncate, str_to_uint32(), string_to_int_array(), locale_data::unicode_data_file, unicode_data_lower_mult, unicode_data_upper_mult, UNICODE_DECOMP_MAP_CP_COUNT, UNICODE_FILE_CHAR_DECOMPOSITION_MAPPING, UNICODE_FILE_FIELDS, UNICODE_FILE_GENERAL_CAT_POS, UNICODE_FILE_LINE_SIZE, UNICODE_FILE_LOWER_CASE_MAP, UNICODE_FILE_UPPER_CASE_MAP, unicode_free_data(), UNICODE_CHAR::unicode_mapping, UNICODE_CHAR::unicode_mapping_cp_count, locale_data::unicode_mode, UNICODEDATA_FILE, and UNICODE_CHAR::upper_cp.
Referenced by unicode_process_alphabet(), and unicode_process_normalization().
Definition at line 661 of file unicode_support.c.
References assert, i, NULL, str_to_uint32(), and strlen.
Referenced by load_ducet(), and load_unicode_data().
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 | ||
) |
Definition at line 1174 of file unicode_support.c.
References assert, unicode_mapping::buffer, CAST_STRLEN, unicode_mapping::cp, CP_HAS_MAPPINGS, GET_MAPPING_OFFSET, i, intl_cp_to_utf8(), intl_utf8_to_cp(), MAX_UNICODE_CHARS, NULL, prm_get_bool_value(), PRM_ID_UNICODE_INPUT_NORMALIZATION, unicode_mapping::size, str_out(), unicode_normalization::unicode_mapping_index, and unicode_normalization::unicode_mappings.
Referenced by csql_help_schema(), csql_help_trigger(), jsp_unpack_string_value(), and netval_to_dbval().
void unicode_decompose_string | ( | const char * | str_in, |
const int | size_in, | ||
char * | str_out, | ||
int * | size_out, | ||
const UNICODE_NORMALIZATION * | norm | ||
) |
Definition at line 1359 of file unicode_support.c.
References assert, unicode_mapping::buffer, CAST_STRLEN, if(), intl_utf8_to_cp(), unicode_normalization::list_full_decomp, MAX_UNICODE_CHARS, NULL, prm_get_bool_value(), PRM_ID_UNICODE_OUTPUT_NORMALIZATION, unicode_mapping::size, str_out(), and unicode_normalization::unicode_mappings.
Referenced by csql_db_value_as_string(), dbval_to_net_buf(), and jsp_pack_string_argument().
void unicode_free_data | ( | void | ) |
Definition at line 565 of file unicode_support.c.
References last_unicode_file, and NULL.
Referenced by load_unicode_data(), and locale_compile_locale().
|
static |
Definition at line 1029 of file unicode_support.c.
References assert, unicode_mapping::buffer, unicode_mapping::cp, UNICODE_CP_MAPPING::cp, ER_LOC_GEN, i, intl_cp_to_utf8(), INTL_UTF8_MAX_CHAR_SIZE, UNICODE_CP_MAPPING::is_full_decomp, unicode_normalization::list_full_decomp, LOG_LOCALE_ERROR, UNICODE_CP_MAPPING::map, MAX_UNICODE_CHARS, NO_ERROR, NULL, unicode_mapping::size, UNICODE_CP_MAPPING::size, UNICODE_DECOMP_MAP_CP_COUNT, unicode_normalization::unicode_mappings, unicode_normalization::unicode_mappings_count, and locale_data::unicode_normalization.
Referenced by unicode_process_normalization().
int unicode_process_alphabet | ( | LOCALE_DATA * | ld, |
bool | is_verbose | ||
) |
Definition at line 134 of file unicode_support.c.
References alphabet_data::a_type, locale_data::alpha_tailoring, locale_data::alphabet, ALPHABET_ASCII, alphabet_tailoring::alphabet_mode, ALPHABET_TAILORED, ALPHABET_UNICODE, assert, CAT_Ll, CAT_Lu, alphabet_tailoring::count_rules, create_alphabet(), transform_rule::dest, transform_rule::dest_size, envvar_localedatadir_file(), ER_LOC_GEN, ERR_MSG_SIZE, error(), i, locale_data::identif_alphabet, INTL_CASING_EXPANSION_MULTIPLIER, intl_utf8_to_cp_list(), load_unicode_data(), LOG_LOCALE_ERROR, UNICODE_CHAR::lower_cp, alphabet_data::lower_cp, NO_ERROR, NULL, alphabet_tailoring::rules, alphabet_tailoring::sett_max_letters, transform_rule::src, transform_rule::src_size, TR_LOWER, TR_UPPER, transform_rule::type, alphabet_tailoring::unicode_data_file, unicode_data_lower_mult, unicode_data_upper_mult, UNICODEDATA_FILE, UNICODE_CHAR::upper_cp, and alphabet_data::upper_cp.
Referenced by locale_compile_locale().
int unicode_process_normalization | ( | LOCALE_DATA * | ld, |
bool | is_verbose | ||
) |
Definition at line 711 of file unicode_support.c.
References assert, comp_func_grouping_unicode_cp_mapping(), comp_func_unicode_cp_mapping(), count_decomp_steps(), count_full_decomp_cp(), UNICODE_CP_MAPPING::cp, CP_HAS_MAPPINGS, ER_LOC_GEN, GET_MAPPING_OFFSET, i, UNICODE_CP_MAPPING::is_full_decomp, load_unicode_data(), LOG_LOCALE_ERROR, UNICODE_CP_MAPPING::map, MAX_UNICODE_CHARS, NO_ERROR, NULL, SET_MAPPING_INDEX, UNICODE_CP_MAPPING::size, UNICODE_CHAR::unicode_full_decomp_cp_count, unicode_make_normalization_data(), UNICODE_CHAR::unicode_mapping, UNICODE_CHAR::unicode_mapping_cp_count, unicode_normalization::unicode_mapping_index, unicode_normalization::unicode_mappings_count, and locale_data::unicode_normalization.
Referenced by locale_compile_locale().
bool unicode_string_need_compose | ( | const char * | str_in, |
const int | size_in, | ||
int * | size_out, | ||
const UNICODE_NORMALIZATION * | norm | ||
) |
Definition at line 1128 of file unicode_support.c.
References assert, NULL, prm_get_bool_value(), and PRM_ID_UNICODE_INPUT_NORMALIZATION.
Referenced by csql_help_schema(), csql_help_trigger(), jsp_unpack_string_value(), and netval_to_dbval().
bool unicode_string_need_decompose | ( | const char * | str_in, |
const int | size_in, | ||
int * | decomp_size, | ||
const UNICODE_NORMALIZATION * | norm | ||
) |
Definition at line 1274 of file unicode_support.c.
References assert, CAST_STRLEN, if(), intl_utf8_to_cp(), unicode_normalization::list_full_decomp, MAX_UNICODE_CHARS, NULL, prm_get_bool_value(), PRM_ID_UNICODE_OUTPUT_NORMALIZATION, unicode_mapping::size, and unicode_normalization::unicode_mappings.
Referenced by csql_db_value_as_string(), dbval_to_net_buf(), and jsp_pack_string_argument().
|
static |
Definition at line 114 of file unicode_support.c.
Referenced by load_unicode_data(), and unicode_free_data().
GENERAL_CATEGORY list_gen_cat[] |
Definition at line 70 of file unicode_support.c.
|
static |
Definition at line 110 of file unicode_support.c.
|
static |
Definition at line 111 of file unicode_support.c.
Referenced by load_unicode_data(), and unicode_process_alphabet().
|
static |
Definition at line 112 of file unicode_support.c.
Referenced by load_unicode_data(), and unicode_process_alphabet().