CUBRID Engine  latest
intl_support.c File Reference
#include "config.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <locale.h>
#include <ctype.h>
#include <wctype.h>
#include "error_manager.h"
#include "intl_support.h"
#include "language_support.h"
#include "chartype.h"
#include "system_parameter.h"
#include "charset_converters.h"
Include dependency graph for intl_support.c:

Go to the source code of this file.

Macros

#define strlen(s1)   ((int) strlen(s1))
 
#define IS_8BIT(c)   ((c) >> 7)
 
#define SS3   143
 
#define LOCALE_C   "C"
 
#define LOCALE_KOREAN   "korean"
 
#define CHAR_BYTE_TO_LOWER(c)   ((c) + ('a' - 'A'))
 
#define CHAR_BYTE_TO_UPPER(c)   ((c) - ('a' - 'A'))
 
#define ISO_8859_9_FIRST_CP   0x11e
 
#define ISO_8859_9_LAST_CP   0x15f
 
#define UTF8_BYTE_IN_RANGE(b, r1, r2)   (!(b < r1 || b > r2))
 
#define OUTPUT(charp_out)   if (pos != NULL) *pos = (char *) charp_out
 
#define OUTPUT(charp_out)   if (pos != NULL) *pos = (char *) charp_out
 

Functions

static int intl_tolower_euc (const unsigned char *src, unsigned char *d, int byte_size)
 
static int intl_toupper_euc (const unsigned char *src, unsigned char *d, int byte_size)
 
static int intl_count_euc_chars (const unsigned char *s, int length_in_bytes)
 
static int intl_count_euc_bytes (const unsigned char *s, int length_in_chars)
 
static int intl_tolower_utf8 (const ALPHABET_DATA *a, const unsigned char *s, unsigned char *d, int length_in_chars, int *d_size)
 
static int intl_toupper_utf8 (const ALPHABET_DATA *a, const unsigned char *s, unsigned char *d, int length_in_chars, int *d_size)
 
static int intl_count_utf8_bytes (const unsigned char *s, int length_in_chars)
 
static int intl_char_tolower_utf8 (const ALPHABET_DATA *a, const unsigned char *s, const int size, unsigned char *d, unsigned char **next)
 
static int intl_char_toupper_utf8 (const ALPHABET_DATA *a, const unsigned char *s, const int size, unsigned char *d, unsigned char **next)
 
static int intl_strcasecmp_utf8_one_cp (const ALPHABET_DATA *alphabet, unsigned char *str1, unsigned char *str2, const int size_str1, const int size_str2, unsigned int cp1, unsigned int cp2, int *skip_size1, int *skip_size2)
 
static void intl_init_conv_iso8859_9_to_utf8 (void)
 
static void intl_init_conv_iso8859_1_to_utf8 (void)
 
char * intl_mbs_chr (const char *mbs, wchar_t wc)
 
int intl_mbs_len (const char *mbs)
 
const char * intl_mbs_nth (const char *mbs, size_t n)
 
int intl_mbs_spn (const char *mbs, const wchar_t *chars)
 
int intl_mbs_casecmp (const char *mbs1, const char *mbs2)
 
int intl_mbs_ncasecmp (const char *mbs1, const char *mbs2, size_t n)
 
char * intl_mbs_ncpy (char *mbs1, const char *mbs2, size_t n)
 
int intl_tolower_iso8859 (unsigned char *s, int length)
 
int intl_toupper_iso8859 (unsigned char *s, int length)
 
const unsigned char * intl_nextchar_euc (const unsigned char *s, int *curr_char_length)
 
const unsigned char * intl_prevchar_euc (const unsigned char *s, const unsigned char *s_start, int *prev_char_length)
 
int intl_convert_charset (const unsigned char *src, int length_in_chars, INTL_CODESET src_codeset, unsigned char *dest, INTL_CODESET dest_codeset, int *unconverted)
 
int intl_char_count (const unsigned char *src, int length_in_bytes, INTL_CODESET src_codeset, int *char_count)
 
int intl_char_size (const unsigned char *src, int length_in_chars, INTL_CODESET src_codeset, int *byte_count)
 
const unsigned char * intl_prev_char (const unsigned char *s, const unsigned char *s_start, INTL_CODESET codeset, int *prev_char_size)
 
const unsigned char * intl_next_char (const unsigned char *s, INTL_CODESET codeset, int *current_char_size)
 
int intl_cmp_char (const unsigned char *s1, const unsigned char *s2, INTL_CODESET codeset, int *char_size)
 
void intl_pad_char (const INTL_CODESET codeset, unsigned char *pad_char, int *pad_size)
 
int intl_pad_size (INTL_CODESET codeset)
 
int intl_upper_string_size (const ALPHABET_DATA *alphabet, const unsigned char *src, int src_size, int src_length)
 
int intl_upper_string (const ALPHABET_DATA *alphabet, const unsigned char *src, unsigned char *dst, int length_in_chars)
 
int intl_lower_string_size (const ALPHABET_DATA *alphabet, const unsigned char *src, int src_size, int src_length)
 
int intl_lower_string (const ALPHABET_DATA *alphabet, const unsigned char *src, unsigned char *dst, int length_in_chars)
 
INTL_ZONE intl_zone (int category)
 
int intl_reverse_string (const unsigned char *src, unsigned char *dst, int length_in_chars, int size_in_bytes, INTL_CODESET codeset)
 
bool intl_is_max_bound_chr (INTL_CODESET codeset, const unsigned char *chr)
 
bool intl_is_min_bound_chr (INTL_CODESET codeset, const unsigned char *chr)
 
int intl_set_min_bound_chr (INTL_CODESET codeset, char *chr)
 
int intl_set_max_bound_chr (INTL_CODESET codeset, char *chr)
 
const unsigned char * intl_nextchar_utf8 (const unsigned char *s, int *curr_char_length)
 
const unsigned char * intl_prevchar_utf8 (const unsigned char *s, const unsigned char *s_start, int *prev_char_length)
 
int intl_count_utf8_chars (const unsigned char *s, int length_in_bytes)
 
int intl_identifier_casecmp_w_size (const INTL_LANG lang_id, unsigned char *str1, unsigned char *str2, const int size_str1, const int size_str2)
 
int intl_case_match_tok (const INTL_LANG lang_id, const INTL_CODESET codeset, unsigned char *tok, unsigned char *src, const int size_tok, const int size_src, int *matched_size_src)
 
int intl_identifier_casecmp (const char *str1, const char *str2)
 
int intl_identifier_ncasecmp (const char *str1, const char *str2, const int len)
 
int intl_identifier_cmp (const char *str1, const char *str2)
 
int intl_identifier_namecmp (const char *str1, const char *str2)
 
int intl_identifier_lower_string_size (const char *src)
 
int intl_identifier_lower (const char *src, char *dst)
 
int intl_identifier_upper_string_size (const char *src)
 
int intl_identifier_upper (const char *src, char *dst)
 
int intl_identifier_fix (char *name, int ident_max_size, bool error_on_case_overflow)
 
unsigned int intl_identifier_mht_1strlowerhash (const void *key, const unsigned int ht_size)
 
int intl_put_char (unsigned char *dest, const unsigned char *char_p, const INTL_CODESET codeset)
 
bool intl_is_space (const char *str, const char *str_end, const INTL_CODESET codeset, int *space_size)
 
const char * intl_skip_spaces (const char *str, const char *str_end, const INTL_CODESET codeset)
 
const char * intl_backskip_spaces (const char *str_begin, const char *str_end, const INTL_CODESET codeset)
 
int intl_cp_to_utf8 (const unsigned int codepoint, unsigned char *utf8_seq)
 
int intl_cp_to_dbcs (const unsigned int codepoint, const unsigned char *byte_flag, unsigned char *seq)
 
unsigned int intl_utf8_to_cp (const unsigned char *utf8, const int size, unsigned char **next_char)
 
unsigned int intl_back_utf8_to_cp (const unsigned char *utf8_start, const unsigned char *utf8_last, unsigned char **last_byte__prev_char)
 
unsigned int intl_dbcs_to_cp (const unsigned char *seq, const int size, const unsigned char *byte_flag, unsigned char **next_char)
 
int intl_utf8_to_cp_list (const unsigned char *utf8, const int size, unsigned int *cp_array, const int max_array_size, int *array_count)
 
INTL_UTF8_VALIDITY intl_check_utf8 (const unsigned char *buf, int size, char **pos)
 
INTL_UTF8_VALIDITY intl_check_euckr (const unsigned char *buf, int size, char **pos)
 
INTL_UTF8_VALIDITY intl_check_string (const char *buf, int size, char **pos, const INTL_CODESET codeset)
 
bool intl_is_bom_magic (const char *buf, const int size)
 
int intl_text_single_byte_to_utf8 (const char *in_buf, const int in_size, char **out_buf, int *out_size)
 
int intl_text_single_byte_to_utf8_ext (void *t, const unsigned char *in_buf, const int in_size, unsigned char **out_buf, int *out_size)
 
int intl_text_utf8_to_single_byte (const char *in_buf, const int in_size, char **out_buf, int *out_size)
 
int intl_text_dbcs_to_utf8 (const char *in_buf, const int in_size, char **out_buf, int *out_size)
 
int intl_text_dbcs_to_utf8_ext (void *t, const unsigned char *in_buf, const int in_size, unsigned char **out_buf, int *out_size)
 
int intl_text_utf8_to_dbcs (const char *in_buf, const int in_size, char **out_buf, int *out_size)
 
int intl_fast_iso88591_to_utf8 (const unsigned char *in_buf, const int in_size, unsigned char **out_buf, int *out_size)
 
int intl_euckr_to_iso88591 (const unsigned char *in_buf, const int in_size, unsigned char **out_buf, int *out_size)
 
int intl_euckr_to_utf8 (const unsigned char *in_buf, const int in_size, unsigned char **out_buf, int *out_size)
 
int intl_utf8_to_iso88591 (const unsigned char *in_buf, const int in_size, unsigned char **out_buf, int *out_size)
 
int intl_utf8_to_euckr (const unsigned char *in_buf, const int in_size, unsigned char **out_buf, int *out_size)
 
int intl_iso88591_to_euckr (const unsigned char *in_buf, const int in_size, unsigned char **out_buf, int *out_size)
 
bool intl_is_currency_symbol (const char *src, DB_CURRENCY *currency, int *symbol_size, const CURRENCY_CHECK_MODE check_mode)
 
char * intl_get_money_symbol (const DB_CURRENCY currency, INTL_CODESET codeset)
 
char * intl_get_money_symbol_console (const DB_CURRENCY currency)
 
char * intl_get_money_symbol_grammar (const DB_CURRENCY currency)
 
int intl_get_currency_symbol_position (const DB_CURRENCY currency)
 
char * intl_get_money_ISO_symbol (const DB_CURRENCY currency)
 
char * intl_get_money_esc_ISO_symbol (const DB_CURRENCY currency)
 
char * intl_get_money_UTF8_symbol (const DB_CURRENCY currency)
 
char * intl_get_money_ISO88591_symbol (const DB_CURRENCY currency)
 
void intl_binary_to_utf8 (const unsigned char *in_buf, const int in_size, unsigned char **out_buf, int *out_size)
 
void intl_binary_to_euckr (const unsigned char *in_buf, const int in_size, unsigned char **out_buf, int *out_size)
 

Variables

static CONV_CP_TO_BYTES iso8859_9_To_utf8_conv [256]
 
static CONV_CP_TO_BYTES utf8_Cp_to_iso_8859_9_conv [ISO_8859_9_LAST_CP-ISO_8859_9_FIRST_CP+1]
 
static CONV_CP_TO_BYTES iso8859_1_To_utf8_conv [256]
 
bool intl_Mbs_support = true
 
bool intl_String_validation = false
 
TEXT_CONVERSION con_Iso_8859_9_conv
 
TEXT_CONVERSION con_Iso_8859_1_conv
 
static const unsigned char len_utf8_char [256]
 
const unsigned char *const intl_Len_utf8_char = len_utf8_char
 
static char moneysymbols_utf8 [][4]
 
static char moneysymbols_console [][4]
 
static char moneysymbols_grammar [][5]
 
static char moneysymbols_iso_codes [][4]
 
static char moneysymbols_esc_iso_codes [][5]
 
static char moneysymbols_iso88591_codes [][4]
 

Macro Definition Documentation

#define CHAR_BYTE_TO_LOWER (   c)    ((c) + ('a' - 'A'))

Definition at line 69 of file intl_support.c.

Referenced by intl_tolower_iso8859().

#define CHAR_BYTE_TO_UPPER (   c)    ((c) - ('a' - 'A'))

Definition at line 71 of file intl_support.c.

Referenced by intl_toupper_iso8859().

#define IS_8BIT (   c)    ((c) >> 7)

Definition at line 46 of file intl_support.c.

Referenced by intl_nextchar_euc(), intl_prevchar_euc(), and intl_reverse_string().

#define ISO_8859_9_FIRST_CP   0x11e

Definition at line 74 of file intl_support.c.

Referenced by intl_init_conv_iso8859_9_to_utf8().

#define ISO_8859_9_LAST_CP   0x15f

Definition at line 75 of file intl_support.c.

Referenced by intl_init_conv_iso8859_9_to_utf8().

#define LOCALE_C   "C"

Definition at line 52 of file intl_support.c.

#define LOCALE_KOREAN   "korean"

Definition at line 56 of file intl_support.c.

Referenced by intl_lower_string().

#define OUTPUT (   charp_out)    if (pos != NULL) *pos = (char *) charp_out
#define OUTPUT (   charp_out)    if (pos != NULL) *pos = (char *) charp_out
#define strlen (   s1)    ((int) strlen(s1))

Definition at line 43 of file intl_support.c.

Referenced by access_control_read_config_file(), add_commas(), add_res_data_datetimetz(), add_res_data_string_safe(), add_res_data_timestamptz(), add_xml_element(), adj_ar_concat_strings(), admin_conf_change(), admin_init_env(), admin_start_cmd(), ansisql_strcasecmp(), api_qrmeta_get_info(), api_rmeta_get_info(), area_create(), au_add_user_method(), au_dump_auth(), au_dump_to_file(), au_dump_user(), au_export_users(), au_find_user(), au_has_user_name(), au_login(), au_perform_login(), au_set_new_auth(), au_set_password_internal(), au_set_user_comment(), au_start(), au_user_name(), basename_r(), bf2df_str_son_index(), bfmt_print(), bifmt_numeric_value(), bigint_to_string(), bit_to_string(), boot_add_charsets(), boot_add_collations(), boot_add_data_type(), boot_define_dual(), boot_find_rest_temp_volumes(), boot_initialize_client(), boot_make_temp_volume_fullname(), boot_parse_add_volume_extensions(), brief_monitor(), broker_config_read_internal(), broker_create_dir(), btree_fix_root_for_delete(), btree_fix_root_for_insert(), build_attr_change_map(), build_class_grant_list(), build_query_graph_function_index(), cas_log_debug(), cas_main(), cas_runner(), catalog_check_consistency(), catalog_dump(), catcls_find_oid_by_class_name(), catcls_get_db_collation(), catcls_get_or_value_from_attribute(), catcls_get_server_compat_info(), cfg_copy_hosts(), cfg_create_host_list(), cfg_get_directory_filename(), cfg_host_exists(), cfg_write_directory(), cfg_write_directory_ex(), cubload::sa_class_installer::check_class(), check_env_lang_val(), cubregex::check_should_recompile(), classobj_attribute_size(), classobj_class_size(), classobj_copy_default_expr(), classobj_make_descriptor(), classobj_method_file_size(), classobj_method_signature_size(), classobj_method_size(), classobj_partition_info_size(), classobj_put_index(), classobj_query_spec_size(), classobj_resolution_size(), cnv_bad_char(), cnv_wcs(), co_signal(), co_signalv(), coerce_date_to_dbvalue(), coerce_datetime_to_dbvalue(), coerce_time_to_dbvalue(), coerce_timestamp_to_dbvalue(), collect_class_grants(), compile_trigger_activity(), COMPOSE_FULL_NAME(), connect_srv(), object_print::copy_string(), create_filename(), create_or_drop_index_helper(), createdb(), crypt_encrypt_printable(), crypt_encrypt_sha1_printable(), csession_create_prepared_statement(), csql(), csql_append_more_line(), csql_db_value_as_string(), csql_do_session_cmd(), csql_edit_contents_append(), csql_edit_read_file(), csql_execute_statements(), csql_fputs_console_conv(), csql_get_session_cmd_no(), csql_help_schema(), csql_help_trigger(), csql_invoke_system_editor(), csql_print_buffer(), csql_results(), csql_string_to_plain_string(), csql_walk_statement(), css_accept_new_request(), css_accept_old_request(), css_add_client_version_string(), css_add_request_to_socket_queue(), css_gethostname(), css_notify_ha_log_applier_state(), css_pack_server_name(), css_process_activate_heartbeat(), css_process_all_list_info(), css_process_deact_confirm_no_server(), css_process_deact_confirm_stop_all(), css_process_deact_stop_all(), css_process_deactivate_heartbeat(), css_process_get_server_ha_mode(), css_process_ha_admin_info(), css_process_ha_deregister_by_args(), css_process_ha_deregister_by_pid(), css_process_ha_node_list_info(), css_process_ha_ping_host_info(), css_process_ha_process_list_info(), css_process_ha_start_util_process(), css_process_is_registered_ha_proc(), css_process_kill_all_ha_process(), css_process_kill_immediate(), css_process_kill_slave(), css_process_reconfig_heartbeat(), css_process_server_list_info(), css_process_shutdown_time_info(), css_queue_connection(), css_register_new_server2(), css_register_server_timeout_fn(), css_server_connect(), css_tcp_master_datagram(), css_tcp_setup_server_datagram(), cub_catopen(), cub_dirname_r(), date_to_char(), db_add_time(), db_blob_from_file(), db_ceil_dbval(), db_check_or_create_null_term_string(), db_check_time_date_format(), db_clob_from_file(), db_compress_like_pattern(), db_cp_query_type(), db_cp_query_type_helper(), db_date_add_sub_interval_days(), db_date_add_sub_interval_expr(), db_date_format(), db_date_locale_init(), db_datetime_string(), db_evaluate_json_type_dbval(), db_execute_oid(), db_floor_dbval(), db_format(), db_from_tz(), db_get_database_name(), db_get_date_format(), db_get_user_and_host_name(), db_inet_ntoa(), db_init_query_result(), db_json_add_element_to_array(), db_json_add_json_value_to_object(), db_json_add_member_to_object(), db_new_time(), db_object_describe(), db_object_fetch(), db_private_strdup(), db_round_dbval(), db_str_to_date(), db_str_to_millisec(), db_string_date(), db_string_datetime(), db_string_fix_string_size(), db_string_instr(), db_string_position(), db_string_time(), db_string_timestamp(), db_string_to_date(), db_string_to_datetime(), db_string_to_datetimeltz(), db_string_to_datetimetz(), db_string_to_time(), db_string_to_timestamp(), db_string_to_timestampltz(), db_string_to_timestamptz(), db_string_value(), db_time_dbval(), db_time_format(), db_time_string(), db_timestamp_string(), db_to_date(), db_to_datetime(), db_to_number(), db_to_time(), db_to_timestamp(), db_trunc_dbval(), db_tz_offset(), db_validate(), db_value_get(), dblob_to_caslob(), dbval_to_net_buf(), delete_all_slave_ha_apply_info(), disk_format(), disk_set_creation(), disk_set_link(), disk_vhdr_length_of_varfields(), disk_vhdr_set_next_vol_fullname(), disk_vhdr_set_vol_fullname(), disk_vhdr_set_vol_remarks(), display_buffer(), do_alter_index_rebuild(), do_alter_serial(), do_create_auto_increment_serial(), do_create_partition(), do_create_serial(), do_evaluate_default_expr(), do_find_auto_increment_serial(), do_is_partitioned_subclass(), do_prepare_delete(), do_prepare_insert_internal(), do_prepare_merge(), do_prepare_select(), do_prepare_update(), do_promote_partition_by_name(), do_reclaim_addresses(), do_recreate_filter_index_constr(), do_recreate_func_index_constr(), do_redistribute_partitions_data(), do_remove_partition_pre(), do_rename_partition(), do_replicate_statement(), do_update_auto_increment_serial_on_rename(), do_update_maxvalue_of_auto_increment_serial(), double_to_string(), drop_foreign_key_ref(), dumplocale(), duplicate_string(), ehash_compose_record(), ehash_hash_string_type(), ehash_insert_helper(), ehash_insert_to_bucket(), elo_create(), emit_put_db_value(), encrypt_password_sha2_512(), envvar_check_environment(), envvar_expand(), envvar_trim_char(), er_create_fmt_msg(), er_emergency(), er_estimate_size(), er_fname_free(), er_get_area_error(), er_init(), er_internal_msg(), er_log_slow_query(), er_set_area_error(), er_set_internal(), er_vsprintf(), es_posix_delete_file(), es_posix_get_file_size(), es_posix_read_file(), es_posix_write_file(), event_file_open(), extract_objects(), fetch_attribute(), fetch_class(), fetch_constraint(), fetch_methfile(), fetch_method(), fetch_peek_arith(), fetch_privilege(), fetch_trigger(), ffmt_value(), fileio_get_primitive_way_max(), fileio_get_volume_label(), fileio_list_restore(), fileio_read_restore(), fill_string_to_buffer(), fix_volume_header(), flush_caches(), fmt_date_string(), fmt_fractional_value(), fmt_minute_value(), fmt_time_string(), fmt_time_value(), fmt_timestamp_string(), fmt_timestamp_value(), fn_execute_array(), fn_execute_internal(), fn_oid(), fn_prepare_internal(), fprint_special_strings(), gen_tz(), genlocale(), get_args(), get_class_mops(), get_class_mops_from_file(), get_column_default_as_string(), get_column_name_argument(), get_cubrid_file(), get_current_result(), get_domain_str(), get_elem_path_token_at(), get_host_ip(), get_name_from_class_oid(), get_next_log_line(), get_number_token(), cubpacking::packer::get_packed_small_string_size(), get_query_stmt_from_plan(), get_requested_classes(), get_server_state_from_master(), get_string_date_token_id(), getmsg(), getopt_long(), hb_get_admin_info_string(), hb_get_node_info_string(), hb_get_ping_host_info_string(), hb_get_process_info_string(), hb_pack_server_name(), hb_reload_config(), heap_get_class_name_alloc_if_diff(), heap_set_autoincrement_value(), help_describe_mop(), help_print_info(), hide_cmd_line_args(), ini_parse_line(), ini_parser_load(), ini_seccmp(), ini_str_trim(), ini_table_hash(), init_proxy_env(), insert_ha_apply_info(), cubload::sa_class_installer::install_class(), intl_check_euckr(), intl_check_utf8(), intl_identifier_casecmp(), intl_identifier_fix(), intl_identifier_lower(), intl_identifier_lower_string_size(), intl_identifier_mht_1strlowerhash(), intl_identifier_namecmp(), intl_identifier_upper(), intl_identifier_upper_string_size(), intl_is_currency_symbol(), intl_mbs_len(), intl_mbs_ncpy(), intl_mbs_nth(), intl_mbs_spn(), is_bind_with_size(), is_cas_log(), jsp_pack_string_argument(), jsp_send_call_request(), jsp_unpack_numeric_value(), jsp_unpack_string_value(), killtran(), ko_date_string(), ko_time_string(), ko_time_value(), la_add_repl_filter(), la_create_repl_filter(), la_delete_ha_apply_info(), la_find_log_pagesize(), la_get_ha_apply_info(), la_get_hostname_from_log_path(), la_insert_ha_apply_info(), la_update_ha_apply_info_log_record_time(), la_update_ha_apply_info_start_time(), la_update_ha_last_applied_info(), lang_get_builtin_lang_id_from_name(), lang_init_console_txt_conv(), lang_locale_data_load_from_lib(), ldr_act_add_argument(), ldr_act_add_class_all_attrs(), ldr_process_object_ref(), load_properties(), loaddb_internal(), local_decimal(), local_grouping(), local_thousands(), locator_assign_oid(), locator_check_class_names(), locator_check_fk_validity(), locator_delete_class_name(), locator_delete_force_internal(), locator_find_class_oid(), locator_initialize(), locator_insert_force(), locator_print_class_name(), locator_update_force(), lock_demote_class_lock(), log_active_log_header_start_scan(), log_append_savepoint(), log_archive_log_header_start_scan(), log_converter(), log_does_active_user_exist(), log_dump_log_info(), log_initialize_internal(), log_set_suppress_repl_on_transaction(), log_top(), logddl_create_dir(), logddl_create_log_msg(), logddl_write(), logddl_write_end_for_csql_fileinput(), logddl_write_tran_str(), logpb_backup_level_info_to_string(), logpb_check_stop_at_time(), logpb_initialize_header(), logpb_verify_length(), main(), make_cst_item_value(), make_debug_h(), make_desired_string_db_value(), make_env(), make_number(), make_number_to_char(), make_scientific_notation(), make_sp_value(), make_sql_stmt(), MCWriteCat(), method_initialize_vacomm_buffer(), mfmt_value(), mht_get_hash_number(), mq_get_expression(), mr_cmpval_string(), mr_cmpval_varnchar(), mr_data_lengthval_char(), mr_data_lengthval_nchar(), mr_lengthval_string_internal(), mr_lengthval_varnchar_internal(), mr_setmem_char(), mr_setmem_nchar(), mr_setmem_string(), mr_setmem_varnchar(), mr_setval_char(), mr_setval_midxkey(), mr_setval_nchar(), mr_setval_string(), mr_setval_varnchar(), mr_writeval_char_internal(), mr_writeval_nchar_internal(), mr_writeval_string_internal(), mr_writeval_varnchar_internal(), net_buf_column_info_set(), net_buf_error_msg_set(), net_client_init(), net_client_request_with_callback(), net_connect_proxy(), net_error_append_shard_info(), net_init_env(), netval_to_dbval(), nonscr_display_error(), num_fmt_print(), number_to_char(), numeric_coerce_dec_str_to_num(), numeric_coerce_num_to_num(), numeric_db_value_coerce_from_num(), numeric_get_fractional_part(), numeric_get_integral_part(), numeric_internal_real_to_num(), numeric_is_fraction_part_zero(), numeric_to_string(), or_get_json_validator(), or_install_btids_filter_pred(), or_install_btids_function_info(), or_pack_query_format(), or_pack_string(), or_packed_string_length(), or_put_string_aligned(), or_put_string_aligned_with_length(), organize_query_string(), os_send_signal(), cubpacking::packer::pack_large_c_string(), cubpacking::packer::pack_small_string(), parse_digits(), parse_user_define_file(), pgbuf_add_fixed_at(), pgbuf_add_watch_instance_internal(), pgbuf_watcher_init_debug(), pp_strdup(), prepare_column_info_set(), print_result_set(), print_string_date_token(), print_temp_result(), proc_execute_hide_cmd_args(), process_ha_deregister_by_args(), process_ha_server_mode(), process_ha_start_util_process(), process_is_registered_proc(), process_javasp(), cubload::sa_object_loader::process_line(), cubload::server_object_loader::process_monetary_constant(), process_server(), process_server_info_pid(), process_slave_kill(), proxy_io_connect_to_broker(), proxy_io_make_error_msg(), proxy_io_make_get_db_version(), proxy_io_make_shard_info(), proxy_io_unixd_lsnr(), proxy_process_client_register(), pt_add_lock_class(), pt_append_name(), pt_append_nulstring(), pt_append_string(), pt_append_string_for(), pt_bind_helper(), pt_check_hint(), pt_chop_trailing_dots(), pt_compile_trigger_stmt(), pt_dbval_to_value(), pt_derive_attribute(), pt_domain_to_data_type(), pt_evaluate_db_value_expr(), pt_fillin_type_size(), pt_find_keyword(), pt_fix_first_term_func_index_for_iss(), pt_frob_error(), pt_get_proxy_spec_name(), pt_make_dotted_identifier_internal(), pt_make_query_show_grants(), pt_make_query_show_table(), pt_make_string_value(), pt_node_to_function_index(), pt_node_to_partition_info(), pt_partition_name(), pt_plan_query(), pt_print_alter_index(), pt_print_create_index(), pt_print_drop_index(), pt_print_table_option(), pt_print_value(), pt_record_error(), pt_short_print(), pt_short_print_l(), pt_string_to_db_domain(), pt_to_regu_variable(), pt_trim_as_identifier(), put_string(), qdata_evaluate_sys_connect_by_path(), qdata_list_dbs(), qexec_execute_build_columns(), qexec_execute_insert(), qexec_get_index_pseudocolumn_value_from_tuple(), qmgr_free_list_temp_file(), qo_find_node_indexes(), qo_plan_fprint(), qo_plan_get_cost_fn(), qo_plan_set_cost_fn(), qo_term_string(), query_info_add(), read_multi_line_sql(), remove_appended_trigger_info(), restoredb(), rm_api_get_info(), roundoff(), save_constraint_info_from_pt_node(), sboot_get_locales_info(), sboot_get_timezone_checksum(), scientific_to_decimal_string(), sdk_remarks(), sdk_vlabel(), serialize_collection_as_string(), ses_posix_copy_file(), ses_posix_create_file(), ses_posix_rename_file(), session_add_variable(), session_get_variable(), session_get_variable_no_copy(), cubbase::fileline_location::set(), set_cubrid_file(), set_msg_lang_from_env(), set_prepare_info_into_list(), set_sqlca_err(), set_to_string(), shard_metadata_read_conn(), shard_metadata_read_key(), shard_stmt_change_shard_val_to_id(), shard_stmt_rewrite_sql(), shard_stmt_save_prepare_request(), shard_str_sqls(), show_statistics(), sl_write_statement_sql(), slog_find_lob_locator(), sm_add_static_method(), sm_count_tokens(), sm_default_constraint_name(), sm_file_extension(), sm_free_function_nlist(), sm_get_method_source_file(), sm_partitioned_class_type(), sm_save_constraint_info(), sm_save_filter_index_info(), sm_save_function_index_info(), sql_list_make(), sqmgr_execute_query(), start_csql(), str_to_screen(), strcat_with_realloc(), strdup(), string_disk_size(), string_to_int_array(), string_to_string(), strip_trailing_zeros(), stristr(), synccoll_check(), tde(), cubload::to_db_elo_ext(), tp_dtoa(), tp_ftoa(), tp_value_cast_internal(), tran_server_partial_abort(), tran_server_savepoint(), trim(), uci_put_value(), uncontrol_strdup(), unusable_databases_monitor(), update_locksets_for_multiple_rename(), us_date_string(), us_time_string(), us_time_value(), ustr_casestr(), ut_get_line(), ut_tolower(), ut_trim(), util_byte_to_size_string(), util_hide_password(), util_log_write_command(), ux_database_connect(), ux_execute_array(), ux_execute_batch(), ux_get_attr_type_str(), ux_get_db_version(), ux_get_generated_keys_client_insert(), ux_get_generated_keys_server_insert(), ux_oid_get(), valcnv_append_string(), valcnv_convert_data_to_string(), vid_decode_object(), vs_prepend(), vs_strcat(), write_results_to_stream(), ws_copy_string(), xboot_copy(), xboot_initialize_server(), xboot_register_client(), xboot_soft_rename(), xcache_dump(), xcache_insert(), xdisk_get_remarks(), xlocator_delete_class_name(), xlocator_rename_class_name(), xlocator_reserve_class_name(), xlocator_reserve_class_names(), xlogtb_get_pack_tran_table(), and xstats_update_all_statistics().

#define UTF8_BYTE_IN_RANGE (   b,
  r1,
  r2 
)    (!(b < r1 || b > r2))

Function Documentation

unsigned int intl_back_utf8_to_cp ( const unsigned char *  utf8_start,
const unsigned char *  utf8_last,
unsigned char **  last_byte__prev_char 
)

Definition at line 3773 of file intl_support.c.

References assert, INTL_UTF8_MAX_CHAR_SIZE, intl_utf8_to_cp(), and NULL.

Referenced by lang_back_strmatch_utf8_uca_w_level(), and lang_get_uca_back_weight_l13().

Here is the caller graph for this function:

const char* intl_backskip_spaces ( const char *  str_begin,
const char *  str_end,
const INTL_CODESET  codeset 
)

Definition at line 3572 of file intl_support.c.

References assert, char_isspace(), INTL_CODESET_ISO88591, INTL_CODESET_KSC5601_EUC, INTL_CODESET_RAW_BYTES, INTL_CODESET_UTF8, and NULL.

Referenced by db_to_date(), db_to_datetime(), db_to_number(), db_to_time(), and db_to_timestamp().

Here is the caller graph for this function:

void intl_binary_to_euckr ( const unsigned char *  in_buf,
const int  in_size,
unsigned char **  out_buf,
int *  out_size 
)

Definition at line 6140 of file intl_support.c.

References CAST_STRLEN, NULL, p, SS3, and UTF8_BYTE_IN_RANGE.

Referenced by qstr_coerce().

Here is the caller graph for this function:

void intl_binary_to_utf8 ( const unsigned char *  in_buf,
const int  in_size,
unsigned char **  out_buf,
int *  out_size 
)

Definition at line 5834 of file intl_support.c.

References assert, CAST_STRLEN, NULL, p, and UTF8_BYTE_IN_RANGE.

Referenced by cublocale::convert_to_wstring(), and qstr_coerce().

Here is the caller graph for this function:

int intl_case_match_tok ( const INTL_LANG  lang_id,
const INTL_CODESET  codeset,
unsigned char *  tok,
unsigned char *  src,
const int  size_tok,
const int  size_src,
int *  matched_size_src 
)
static int intl_char_tolower_utf8 ( const ALPHABET_DATA a,
const unsigned char *  s,
const int  size,
unsigned char *  d,
unsigned char **  next 
)
static
static int intl_char_toupper_utf8 ( const ALPHABET_DATA a,
const unsigned char *  s,
const int  size,
unsigned char *  d,
unsigned char **  next 
)
static
INTL_UTF8_VALIDITY intl_check_euckr ( const unsigned char *  buf,
int  size,
char **  pos 
)

Definition at line 4199 of file intl_support.c.

References INTL_UTF8_INVALID, INTL_UTF8_TRUNCATED, INTL_UTF8_VALID, NULL, OUTPUT, p, SS3, strlen, and UTF8_BYTE_IN_RANGE.

Referenced by db_string_chr(), and intl_check_string().

Here is the caller graph for this function:

INTL_UTF8_VALIDITY intl_check_string ( const char *  buf,
int  size,
char **  pos,
const INTL_CODESET  codeset 
)
INTL_UTF8_VALIDITY intl_check_utf8 ( const unsigned char *  buf,
int  size,
char **  pos 
)

Definition at line 3911 of file intl_support.c.

References assert, INTL_UTF8_INVALID, INTL_UTF8_TRUNCATED, INTL_UTF8_VALID, NULL, OUTPUT, p, strlen, and UTF8_BYTE_IN_RANGE.

Referenced by db_string_chr(), and intl_check_string().

Here is the caller graph for this function:

int intl_cmp_char ( const unsigned char *  s1,
const unsigned char *  s2,
INTL_CODESET  codeset,
int *  char_size 
)
int intl_convert_charset ( const unsigned char *  src,
int  length_in_chars,
INTL_CODESET  src_codeset,
unsigned char *  dest,
INTL_CODESET  dest_codeset,
int *  unconverted 
)
static int intl_count_euc_bytes ( const unsigned char *  s,
int  length_in_chars 
)
static

Definition at line 919 of file intl_support.c.

References assert, intl_nextchar_euc(), and NULL.

Referenced by intl_char_size().

Here is the caller graph for this function:

static int intl_count_euc_chars ( const unsigned char *  s,
int  length_in_bytes 
)
static

Definition at line 890 of file intl_support.c.

References assert, intl_nextchar_euc(), and NULL.

Referenced by intl_char_count(), intl_tolower_euc(), and intl_toupper_euc().

Here is the caller graph for this function:

static int intl_count_utf8_bytes ( const unsigned char *  s,
int  length_in_chars 
)
static

Definition at line 2196 of file intl_support.c.

References assert, intl_nextchar_utf8(), and NULL.

Referenced by intl_char_size().

Here is the caller graph for this function:

int intl_count_utf8_chars ( const unsigned char *  s,
int  length_in_bytes 
)

Definition at line 2167 of file intl_support.c.

References assert, intl_nextchar_utf8(), and NULL.

Referenced by intl_char_count(), intl_identifier_lower(), intl_identifier_upper(), and read_cp_from_tag().

Here is the caller graph for this function:

int intl_cp_to_dbcs ( const unsigned int  codepoint,
const unsigned char *  byte_flag,
unsigned char *  seq 
)

Definition at line 3672 of file intl_support.c.

References assert, and NULL.

Referenced by dump_console_conversion(), and load_console_conv_data().

Here is the caller graph for this function:

unsigned int intl_dbcs_to_cp ( const unsigned char *  seq,
const int  size,
const unsigned char *  byte_flag,
unsigned char **  next_char 
)

Definition at line 3820 of file intl_support.c.

References assert, and NULL.

Referenced by dump_console_conversion(), and intl_text_dbcs_to_utf8_ext().

Here is the caller graph for this function:

int intl_euckr_to_iso88591 ( const unsigned char *  in_buf,
const int  in_size,
unsigned char **  out_buf,
int *  out_size 
)

Definition at line 4942 of file intl_support.c.

References assert, CAST_STRLEN, jisx0212_mbtowc(), ksc5601_mbtowc(), and NULL.

Referenced by qstr_coerce().

Here is the caller graph for this function:

int intl_euckr_to_utf8 ( const unsigned char *  in_buf,
const int  in_size,
unsigned char **  out_buf,
int *  out_size 
)

Definition at line 5062 of file intl_support.c.

References assert, CAST_STRLEN, intl_cp_to_utf8(), jisx0212_mbtowc(), ksc5601_mbtowc(), and NULL.

Referenced by cublocale::convert_to_wstring(), and qstr_coerce().

Here is the caller graph for this function:

int intl_fast_iso88591_to_utf8 ( const unsigned char *  in_buf,
const int  in_size,
unsigned char **  out_buf,
int *  out_size 
)

Definition at line 4893 of file intl_support.c.

References assert, CAST_STRLEN, and NULL.

Referenced by cublocale::convert_to_wstring(), and qstr_coerce().

Here is the caller graph for this function:

int intl_get_currency_symbol_position ( const DB_CURRENCY  currency)

Definition at line 5738 of file intl_support.c.

References DB_CURRENCY_TL.

Referenced by csql_db_value_as_string().

Here is the caller graph for this function:

char* intl_get_money_esc_ISO_symbol ( const DB_CURRENCY  currency)
char* intl_get_money_ISO88591_symbol ( const DB_CURRENCY  currency)

Definition at line 5803 of file intl_support.c.

References DB_CURRENCY_NULL, and moneysymbols_iso88591_codes.

Referenced by intl_get_money_symbol().

Here is the caller graph for this function:

char* intl_get_money_ISO_symbol ( const DB_CURRENCY  currency)

Definition at line 5755 of file intl_support.c.

References DB_CURRENCY_NULL, and moneysymbols_iso_codes.

Referenced by locale_dump().

Here is the caller graph for this function:

char* intl_get_money_symbol ( const DB_CURRENCY  currency,
INTL_CODESET  codeset 
)

Definition at line 5683 of file intl_support.c.

References INTL_CODESET_ISO88591, INTL_CODESET_UTF8, intl_get_money_ISO88591_symbol(), intl_get_money_symbol_console(), and intl_get_money_UTF8_symbol().

Referenced by make_number_to_char().

Here is the caller graph for this function:

char* intl_get_money_symbol_console ( const DB_CURRENCY  currency)

Definition at line 5703 of file intl_support.c.

References DB_CURRENCY_NULL, and moneysymbols_console.

Referenced by csql_db_value_as_string(), intl_get_money_symbol(), and lang_currency_symbol().

Here is the caller graph for this function:

char* intl_get_money_symbol_grammar ( const DB_CURRENCY  currency)

Definition at line 5719 of file intl_support.c.

References DB_CURRENCY_NULL, and moneysymbols_grammar.

char* intl_get_money_UTF8_symbol ( const DB_CURRENCY  currency)

Definition at line 5787 of file intl_support.c.

References DB_CURRENCY_NULL, and moneysymbols_utf8.

Referenced by intl_get_money_symbol().

Here is the caller graph for this function:

int intl_identifier_casecmp ( const char *  str1,
const char *  str2 
)

Definition at line 2740 of file intl_support.c.

References assert, intl_identifier_casecmp_w_size(), lang_id(), NULL, and strlen.

Referenced by add_fk_info_result(), add_using_index(), btree_index_next_scan(), build_attr_change_map(), build_query_graph_function_index(), catcls_get_or_value_from_indexes(), classobj_complist_search(), classobj_find_attribute(), classobj_find_attribute_list(), classobj_find_class_constraint(), classobj_find_component(), classobj_find_constraint_by_attrs(), classobj_find_method(), do_add_attribute(), do_check_partitioned_class(), do_create_user(), do_reorganize_partition_pre(), get_att_default_from_def(), get_attribute_with_name(), heap_get_btid_from_index_name(), is_attr_not_in_insert_list(), is_pt_name_in_group_having(), ldr_act_check_missing_non_null_attrs(), lookup_seg(), mht_compare_identifiers_equal(), mq_check_using_index(), mq_fetch_expression_for_real_class_update(), mq_generate_unique(), mq_lambda_node(), natural_join_equal_attr(), parser_parse_file(), parser_parse_string_with_escapes(), pt_add_type_to_set(), pt_attr_refers_to_self(), pt_check_alter_partition(), pt_check_attribute_domain(), pt_check_isolation_lvl(), pt_check_partitions(), pt_coerce_value_internal(), pt_data_type_to_db_domain(), pt_in_lck_array(), pt_init_one_statement_parser(), pt_lookup_entity(), pt_mark_function_index_expression(), pt_name_equal(), pt_name_occurs_in_from_list(), pt_resolve_group_having_alias_pt_name(), pt_str_compare(), pt_vclass_compatible(), qo_find_index_segs(), qo_find_node_indexes(), qo_get_attr_info_func_index(), qo_rewrite_index_hints(), qo_validate_index_attr_notnull(), qo_validate_index_term_notnull(), query_get_column_with_name(), replace_names_alter_chg_attr(), session_add_variable(), session_create_prepared_statement(), session_delete_prepared_statement(), session_drop_variable(), session_get_prepared_statement(), session_get_variable(), sm_get_descriptor_component(), smt_add_attribute_to_list(), smt_add_constraint(), smt_check_foreign_key(), update_fk_ref_partitioned_class(), and update_locksets_for_multiple_rename().

int intl_identifier_casecmp_w_size ( const INTL_LANG  lang_id,
unsigned char *  str1,
unsigned char *  str2,
const int  size_str1,
const int  size_str2 
)
int intl_identifier_cmp ( const char *  str1,
const char *  str2 
)

Definition at line 2785 of file intl_support.c.

Referenced by pt_str_compare().

Here is the caller graph for this function:

int intl_identifier_fix ( char *  name,
int  ident_max_size,
bool  error_on_case_overflow 
)
int intl_identifier_namecmp ( const char *  str1,
const char *  str2 
)

Definition at line 2803 of file intl_support.c.

References assert, intl_identifier_casecmp_w_size(), lang_id(), NULL, and strlen.

int intl_identifier_ncasecmp ( const char *  str1,
const char *  str2,
const int  len 
)

Definition at line 2765 of file intl_support.c.

References intl_char_size(), intl_identifier_casecmp_w_size(), lang_charset(), and lang_id().

Referenced by ansisql_strcasecmp(), and ldr_is_ignore_class().

Here is the caller graph for this function:

bool intl_is_bom_magic ( const char *  buf,
const int  size 
)

Definition at line 4310 of file intl_support.c.

Referenced by csql_edit_read_file(), and start_csql().

Here is the caller graph for this function:

bool intl_is_max_bound_chr ( INTL_CODESET  codeset,
const unsigned char *  chr 
)

Definition at line 1896 of file intl_support.c.

References INTL_CODESET_ISO88591, INTL_CODESET_KSC5601_EUC, INTL_CODESET_RAW_BYTES, and INTL_CODESET_UTF8.

Referenced by is_safe_last_char_for_like_optimization().

Here is the caller graph for this function:

bool intl_is_min_bound_chr ( INTL_CODESET  codeset,
const unsigned char *  chr 
)

Definition at line 1939 of file intl_support.c.

Referenced by is_safe_last_char_for_like_optimization().

Here is the caller graph for this function:

bool intl_is_space ( const char *  str,
const char *  str_end,
const INTL_CODESET  codeset,
int *  space_size 
)

Definition at line 3403 of file intl_support.c.

References assert, char_isspace(), INTL_CODESET_ISO88591, INTL_CODESET_KSC5601_EUC, INTL_CODESET_RAW_BYTES, INTL_CODESET_UTF8, and NULL.

Referenced by db_conv(), is_str_valid_number(), and numeric_coerce_string_to_num().

Here is the caller graph for this function:

int intl_iso88591_to_euckr ( const unsigned char *  in_buf,
const int  in_size,
unsigned char **  out_buf,
int *  out_size 
)

Definition at line 5308 of file intl_support.c.

References assert, CAST_STRLEN, jisx0212_wctomb(), ksc5601_wctomb(), NULL, and RET_ILUNI.

Referenced by qstr_coerce().

Here is the caller graph for this function:

int intl_lower_string ( const ALPHABET_DATA alphabet,
const unsigned char *  src,
unsigned char *  dst,
int  length_in_chars 
)
int intl_lower_string_size ( const ALPHABET_DATA alphabet,
const unsigned char *  src,
int  src_size,
int  src_length 
)
char* intl_mbs_chr ( const char *  mbs,
wchar_t  wc 
)

Definition at line 149 of file intl_support.c.

References assert, intl_Mbs_support, MB_LEN_MAX, and NULL.

Referenced by co_conversion_spec(), co_find_conversion(), extract_att_name(), extract_bt_idx(), ko_date_value(), and sm_expand_method_files().

Here is the caller graph for this function:

int intl_mbs_len ( const char *  mbs)
int intl_mbs_ncasecmp ( const char *  mbs1,
const char *  mbs2,
size_t  n 
)

Definition at line 441 of file intl_support.c.

References assert, intl_Mbs_support, MB_LEN_MAX, and NULL.

Referenced by intl_mbs_spn(), is_local_am_str(), is_local_pm_str(), make_cst_item_value(), pt_compile_trigger_stmt(), qo_plan_get_cost_fn(), and qo_plan_set_cost_fn().

Here is the caller graph for this function:

char* intl_mbs_ncpy ( char *  mbs1,
const char *  mbs2,
size_t  n 
)
const char* intl_mbs_nth ( const char *  mbs,
size_t  n 
)

Definition at line 219 of file intl_support.c.

References assert, intl_Mbs_support, NULL, and strlen.

Referenced by co_find_conversion(), co_signal(), and fmt_fractional_value().

Here is the caller graph for this function:

int intl_mbs_spn ( const char *  mbs,
const wchar_t *  chars 
)

Definition at line 269 of file intl_support.c.

References assert, intl_mbs_casecmp(), intl_mbs_ncasecmp(), intl_Mbs_support, MB_LEN_MAX, NULL, and strlen.

Referenced by bifmt_numeric_value(), co_find_conversion(), and co_signal().

Here is the caller graph for this function:

const unsigned char* intl_next_char ( const unsigned char *  s,
INTL_CODESET  codeset,
int *  current_char_size 
)
const unsigned char* intl_nextchar_euc ( const unsigned char *  s,
int *  curr_char_length 
)

Definition at line 777 of file intl_support.c.

References assert, IS_8BIT, NULL, and SS3.

Referenced by intl_cmp_char(), intl_count_euc_bytes(), intl_count_euc_chars(), intl_next_char(), intl_put_char(), lang_split_key_euckr(), and lang_strmatch_ko().

Here is the caller graph for this function:

const unsigned char* intl_nextchar_utf8 ( const unsigned char *  s,
int *  curr_char_length 
)

Definition at line 2039 of file intl_support.c.

References INTL_GET_NEXTCHAR_UTF8.

Referenced by intl_count_utf8_bytes(), intl_count_utf8_chars(), intl_next_char(), and intl_reverse_string().

Here is the caller graph for this function:

int intl_pad_size ( INTL_CODESET  codeset)

Definition at line 1486 of file intl_support.c.

References INTL_CODESET_ISO88591, INTL_CODESET_KSC5601_EUC, INTL_CODESET_RAW_BYTES, and INTL_CODESET_UTF8.

Referenced by print_string_date_token(), and transfer_string().

Here is the caller graph for this function:

const unsigned char* intl_prev_char ( const unsigned char *  s,
const unsigned char *  s_start,
INTL_CODESET  codeset,
int *  prev_char_size 
)
const unsigned char* intl_prevchar_euc ( const unsigned char *  s,
const unsigned char *  s_start,
int *  prev_char_length 
)

Definition at line 806 of file intl_support.c.

References assert, IS_8BIT, NULL, and SS3.

Referenced by intl_prev_char().

Here is the caller graph for this function:

const unsigned char* intl_prevchar_utf8 ( const unsigned char *  s,
const unsigned char *  s_start,
int *  prev_char_length 
)

Definition at line 2054 of file intl_support.c.

Referenced by intl_prev_char().

Here is the caller graph for this function:

int intl_put_char ( unsigned char *  dest,
const unsigned char *  char_p,
const INTL_CODESET  codeset 
)
int intl_reverse_string ( const unsigned char *  src,
unsigned char *  dst,
int  length_in_chars,
int  size_in_bytes,
INTL_CODESET  codeset 
)

Definition at line 1802 of file intl_support.c.

References assert, i, INTL_CODESET_ISO88591, INTL_CODESET_KSC5601_EUC, INTL_CODESET_RAW_BYTES, INTL_CODESET_UTF8, intl_nextchar_utf8(), IS_8BIT, NULL, and SS3.

Referenced by db_string_reverse().

Here is the caller graph for this function:

int intl_set_max_bound_chr ( INTL_CODESET  codeset,
char *  chr 
)

Definition at line 1982 of file intl_support.c.

References INTL_CODESET_ISO88591, INTL_CODESET_KSC5601_EUC, INTL_CODESET_RAW_BYTES, and INTL_CODESET_UTF8.

Referenced by db_get_like_optimization_bounds().

Here is the caller graph for this function:

int intl_set_min_bound_chr ( INTL_CODESET  codeset,
char *  chr 
)

Definition at line 1960 of file intl_support.c.

Referenced by db_get_like_optimization_bounds().

Here is the caller graph for this function:

const char* intl_skip_spaces ( const char *  str,
const char *  str_end,
const INTL_CODESET  codeset 
)
static int intl_strcasecmp_utf8_one_cp ( const ALPHABET_DATA alphabet,
unsigned char *  str1,
unsigned char *  str2,
const int  size_str1,
const int  size_str2,
unsigned int  cp1,
unsigned int  cp2,
int *  skip_size1,
int *  skip_size2 
)
static
int intl_text_dbcs_to_utf8 ( const char *  in_buf,
const int  in_size,
char **  out_buf,
int *  out_size 
)

Definition at line 4664 of file intl_support.c.

References intl_text_dbcs_to_utf8_ext(), and lang_get_txt_conv().

Referenced by init_user_locales().

Here is the caller graph for this function:

int intl_text_dbcs_to_utf8_ext ( void *  t,
const unsigned char *  in_buf,
const int  in_size,
unsigned char **  out_buf,
int *  out_size 
)
int intl_text_single_byte_to_utf8 ( const char *  in_buf,
const int  in_size,
char **  out_buf,
int *  out_size 
)

Definition at line 4344 of file intl_support.c.

References intl_text_single_byte_to_utf8_ext(), and lang_get_txt_conv().

Referenced by init_user_locales().

Here is the caller graph for this function:

int intl_text_single_byte_to_utf8_ext ( void *  t,
const unsigned char *  in_buf,
const int  in_size,
unsigned char **  out_buf,
int *  out_size 
)
int intl_text_utf8_to_dbcs ( const char *  in_buf,
const int  in_size,
char **  out_buf,
int *  out_size 
)
int intl_text_utf8_to_single_byte ( const char *  in_buf,
const int  in_size,
char **  out_buf,
int *  out_size 
)
static int intl_tolower_euc ( const unsigned char *  src,
unsigned char *  d,
int  byte_size 
)
static

Definition at line 834 of file intl_support.c.

References assert, char_tolower(), intl_count_euc_chars(), and NULL.

Referenced by intl_lower_string().

Here is the caller graph for this function:

int intl_tolower_iso8859 ( unsigned char *  s,
int  length 
)

Definition at line 721 of file intl_support.c.

References assert, CHAR_BYTE_TO_LOWER, char_isupper_iso8859(), and NULL.

Referenced by check_env_lang_val().

Here is the caller graph for this function:

static int intl_tolower_utf8 ( const ALPHABET_DATA a,
const unsigned char *  s,
unsigned char *  d,
int  length_in_chars,
int *  d_size 
)
static

Definition at line 2082 of file intl_support.c.

References assert, CAST_STRLEN, intl_char_size(), intl_char_tolower_utf8(), INTL_CODESET_UTF8, and NULL.

Referenced by intl_identifier_lower(), and intl_lower_string().

Here is the caller graph for this function:

static int intl_toupper_euc ( const unsigned char *  src,
unsigned char *  d,
int  byte_size 
)
static

Definition at line 859 of file intl_support.c.

References assert, char_toupper(), intl_count_euc_chars(), and NULL.

Referenced by intl_upper_string().

Here is the caller graph for this function:

int intl_toupper_iso8859 ( unsigned char *  s,
int  length 
)

Definition at line 747 of file intl_support.c.

References assert, CHAR_BYTE_TO_UPPER, char_islower_iso8859(), and NULL.

Referenced by check_env_lang_val().

Here is the caller graph for this function:

static int intl_toupper_utf8 ( const ALPHABET_DATA a,
const unsigned char *  s,
unsigned char *  d,
int  length_in_chars,
int *  d_size 
)
static

Definition at line 2123 of file intl_support.c.

References assert, CAST_STRLEN, intl_char_size(), intl_char_toupper_utf8(), INTL_CODESET_UTF8, and NULL.

Referenced by intl_identifier_upper(), and intl_upper_string().

Here is the caller graph for this function:

int intl_upper_string ( const ALPHABET_DATA alphabet,
const unsigned char *  src,
unsigned char *  dst,
int  length_in_chars 
)
int intl_upper_string_size ( const ALPHABET_DATA alphabet,
const unsigned char *  src,
int  src_size,
int  src_length 
)
int intl_utf8_to_cp_list ( const unsigned char *  utf8,
const int  size,
unsigned int *  cp_array,
const int  max_array_size,
int *  array_count 
)

Definition at line 3851 of file intl_support.c.

References assert, CAST_STRLEN, i, intl_utf8_to_cp(), and NULL.

Referenced by apply_tailoring_rules(), dump_collation_contr(), intl_strcasecmp_utf8_one_cp(), and unicode_process_alphabet().

Here is the caller graph for this function:

int intl_utf8_to_euckr ( const unsigned char *  in_buf,
const int  in_size,
unsigned char **  out_buf,
int *  out_size 
)

Definition at line 5217 of file intl_support.c.

References assert, CAST_STRLEN, intl_utf8_to_cp(), jisx0212_wctomb(), ksc5601_wctomb(), NULL, and RET_ILUNI.

Referenced by cublocale::convert_to_string(), and qstr_coerce().

Here is the caller graph for this function:

int intl_utf8_to_iso88591 ( const unsigned char *  in_buf,
const int  in_size,
unsigned char **  out_buf,
int *  out_size 
)

Definition at line 5168 of file intl_support.c.

References assert, CAST_STRLEN, intl_utf8_to_cp(), and NULL.

Referenced by cublocale::convert_to_string(), and qstr_coerce().

Here is the caller graph for this function:

INTL_ZONE intl_zone ( int  category)

Definition at line 1777 of file intl_support.c.

References INTL_LANG_ENGLISH, INTL_LANG_KOREAN, INTL_ZONE_KR, INTL_ZONE_US, and lang_id().

Variable Documentation

TEXT_CONVERSION con_Iso_8859_1_conv
Initial value:
= {
(char *) "28591",
(char *) "iso88591",
{0},
0, 0, NULL,
0, 0, NULL,
}
int intl_text_single_byte_to_utf8(const char *in_buf, const int in_size, char **out_buf, int *out_size)
static void intl_init_conv_iso8859_1_to_utf8(void)
int intl_text_utf8_to_single_byte(const char *in_buf, const int in_size, char **out_buf, int *out_size)
#define NULL
Definition: freelistheap.h:34

Definition at line 128 of file intl_support.c.

Referenced by lang_locale_data_load_from_lib().

TEXT_CONVERSION con_Iso_8859_9_conv
Initial value:
= {
(char *) "28599",
(char *) "iso88599",
{0},
0, 0, NULL,
0, 0, NULL,
}
int intl_text_single_byte_to_utf8(const char *in_buf, const int in_size, char **out_buf, int *out_size)
static void intl_init_conv_iso8859_9_to_utf8(void)
int intl_text_utf8_to_single_byte(const char *in_buf, const int in_size, char **out_buf, int *out_size)
#define NULL
Definition: freelistheap.h:34

Definition at line 116 of file intl_support.c.

Referenced by lang_locale_data_load_from_lib().

const unsigned char* const intl_Len_utf8_char = len_utf8_char

Definition at line 2029 of file intl_support.c.

Referenced by intl_cmp_char(), intl_put_char(), and lang_strmatch_utf8_w_contr().

bool intl_String_validation = false

Definition at line 87 of file intl_support.c.

Referenced by intl_check_string(), and sysprm_load_and_init_internal().

CONV_CP_TO_BYTES iso8859_1_To_utf8_conv[256]
static

Definition at line 81 of file intl_support.c.

Referenced by intl_init_conv_iso8859_1_to_utf8().

CONV_CP_TO_BYTES iso8859_9_To_utf8_conv[256]
static

Definition at line 77 of file intl_support.c.

Referenced by intl_init_conv_iso8859_9_to_utf8().

const unsigned char len_utf8_char[256]
static
Initial value:
= {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5,
5, 5, 5, 6, 6, 1, 1
}

Definition at line 2010 of file intl_support.c.

char moneysymbols_console[][4]
static
Initial value:
= {
"$",
"Y",
"&",
"\\",
"TL",
"KHR",
"CNY",
"INR",
"RUB",
"AUD",
"CAD",
"BRL",
"RON",
"EUR",
"CHF",
"DKK",
"NOK",
"BGN",
"VND",
"CZK",
"PLN",
"SEK",
"HRK",
"RSD",
""
}

Definition at line 5420 of file intl_support.c.

Referenced by intl_get_money_symbol_console(), and intl_is_currency_symbol().

char moneysymbols_esc_iso_codes[][5]
static
Initial value:
= {
"\\USD",
"\\JPY",
"\\GBP",
"\\KRW",
"\\TRY",
"\\KHR",
"\\CNY",
"\\INR",
"\\RUB",
"\\AUD",
"\\CAD",
"\\BRL",
"\\RON",
"\\EUR",
"\\CHF",
"\\DKK",
"\\NOK",
"\\BGN",
"\\VND",
"\\CZK",
"\\PLN",
"\\SEK",
"\\HRK",
"\\RSD",
""
}

Definition at line 5508 of file intl_support.c.

Referenced by intl_get_money_esc_ISO_symbol(), and intl_is_currency_symbol().

char moneysymbols_grammar[][5]
static
Initial value:
= {
"$",
"\xa1\xef",
"\\GBP",
"\\KRW",
"\\TL",
"\\KHR",
"\\CNY",
"\\INR",
"\\RUB",
"\\AUD",
"\\CAD",
"\\BRL",
"\\RON",
"\\EUR",
"\\CHF",
"\\DKK",
"\\NOK",
"\\BGN",
"\\VND",
"\\CZK",
"\\PLN",
"\\SEK",
"\\HRK",
"\\RSD",
""
}

Definition at line 5450 of file intl_support.c.

Referenced by intl_get_money_symbol_grammar(), and intl_is_currency_symbol().

char moneysymbols_iso88591_codes[][4]
static
Initial value:
= {
"$",
"\xa5",
"\xa3",
"KRW",
"TL",
"KHR",
"CNY",
"INR",
"RUB",
"AUD",
"CAD",
"BRL",
"RON",
"EUR",
"CHF",
"DKK",
"NOK",
"BGN",
"VND",
"CZK",
"PLN",
"SEK",
"HRK",
"RSD",
""
}

Definition at line 5537 of file intl_support.c.

Referenced by intl_get_money_ISO88591_symbol(), and intl_is_currency_symbol().

char moneysymbols_iso_codes[][4]
static
Initial value:
= {
"USD",
"JPY",
"GBP",
"KRW",
"TRY",
"KHR",
"CNY",
"INR",
"RUB",
"AUD",
"CAD",
"BRL",
"RON",
"EUR",
"CHF",
"DKK",
"NOK",
"BGN",
"VND",
"CZK",
"PLN",
"SEK",
"HRK",
"RSD",
""
}

Definition at line 5479 of file intl_support.c.

Referenced by intl_get_money_ISO_symbol(), and intl_is_currency_symbol().

char moneysymbols_utf8[][4]
static
Initial value:
= {
"$",
"\xc2\xa5",
"\xc2\xa3",
"\xe2\x82\xa9",
"TL",
"KHR",
"CNY",
"INR",
"RUB",
"AUD",
"CAD",
"BRL",
"RON",
"EUR",
"CHF",
"DKK",
"NOK",
"BGN",
"VND",
"CZK",
"PLN",
"SEK",
"HRK",
"RSD",
"\xc2\xa4"
}

Definition at line 5389 of file intl_support.c.

Referenced by intl_get_money_UTF8_symbol(), and intl_is_currency_symbol().

CONV_CP_TO_BYTES utf8_Cp_to_iso_8859_9_conv[ISO_8859_9_LAST_CP-ISO_8859_9_FIRST_CP+1]
static

Definition at line 78 of file intl_support.c.

Referenced by intl_init_conv_iso8859_9_to_utf8().