CUBRID Engine  latest
intl_support.h File Reference
#include <stdlib.h>
#include <string.h>
#include <locale.h>
#include <limits.h>
#include <assert.h>
#include "dbtype_def.h"
#include "locale_support.h"
Include dependency graph for intl_support.h:

Go to the source code of this file.

Macros

#define MB_LEN_MAX   1
 
#define WEOF   (wint_t)(-1)
 
#define INTL_NEXTCHAR_UTF8(c)   (unsigned char*)((c) + intl_Len_utf8_char[*(unsigned char*)(c)])
 
#define INTL_GET_NEXTCHAR_UTF8(c, l)
 
#define INTL_CODESET_MULT(codeset)
 
#define INTL_CAN_STEAL_CS(cs_from, cs_to)   ((cs_from) == (cs_to) || (cs_to) == INTL_CODESET_RAW_BYTES)
 
#define INTL_CAN_COERCE_CS(cs_from, cs_to)   true
 
#define INTL_NEXT_CHAR(ptr, s, codeset, current_char_size)
 

Typedefs

typedef unsigned int INTL_LANG
 
typedef enum intl_builtin_lang INTL_BUILTIN_LANG
 
typedef enum intl_zone INTL_ZONE
 
typedef enum currency_check_mode CURRENCY_CHECK_MODE
 
typedef enum intl_utf8_validity INTL_UTF8_VALIDITY
 
typedef enum intl_codeset INTL_CODESET
 

Enumerations

enum  intl_builtin_lang { INTL_LANG_ENGLISH = 0, INTL_LANG_KOREAN, INTL_LANG_TURKISH, INTL_LANG_USER_DEF_START }
 
enum  intl_zone { INTL_ZONE_US, INTL_ZONE_KR, INTL_ZONE_GB, INTL_ZONE_TR }
 
enum  currency_check_mode {
  CURRENCY_CHECK_MODE_NONE = 0, CURRENCY_CHECK_MODE_CONSOLE = 0x1, CURRENCY_CHECK_MODE_UTF8 = 0x2, CURRENCY_CHECK_MODE_GRAMMAR = 0x4,
  CURRENCY_CHECK_MODE_ISO = 0x8, CURRENCY_CHECK_MODE_ESC_ISO = 0x10, CURRENCY_CHECK_MODE_ISO88591 = 0x16
}
 
enum  intl_utf8_validity { INTL_UTF8_VALID, INTL_UTF8_INVALID, INTL_UTF8_TRUNCATED }
 
enum  intl_codeset {
  INTL_CODESET_ERROR = -2, INTL_CODESET_NONE = -1, INTL_CODESET_ASCII, INTL_CODESET_RAW_BITS,
  INTL_CODESET_RAW_BYTES, INTL_CODESET_ISO88591, INTL_CODESET_KSC5601_EUC, INTL_CODESET_UTF8,
  INTL_CODESET_BINARY = INTL_CODESET_RAW_BYTES, INTL_CODESET_LAST = INTL_CODESET_UTF8
}
 

Functions

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)
 
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_length)
 
const unsigned char * intl_prevchar_euc (const unsigned char *s, const unsigned char *s_start, int *prev_length)
 
const unsigned char * intl_nextchar_utf8 (const unsigned char *s, int *curr_length)
 
const unsigned char * intl_prevchar_utf8 (const unsigned char *s, const unsigned char *s_start, int *prev_length)
 
INTL_ZONE intl_zone (int category)
 
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)
 
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)
 
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)
 
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)
 
char * intl_mbs_chr (const char *mbs, wchar_t the_char)
 
int intl_mbs_spn (const char *mbs, const wchar_t *chars)
 
int intl_mbs_len (const char *mbs)
 
const char * intl_mbs_nth (const char *mbs, size_t n)
 
char * intl_mbs_ncpy (char *mbs1, const char *mbs2, size_t n)
 
int intl_mbs_casecmp (const char *mbs1, const char *mbs2)
 
int intl_mbs_ncasecmp (const char *mbs1, const char *mbs2, size_t n)
 
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_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)
 
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 *txt_conv, 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_euckr (const unsigned char *in_buf, const int in_size, unsigned char **out_buf, int *out_size)
 
int intl_iso88591_to_utf8 (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_ISO_symbol (const DB_CURRENCY currency)
 
char * intl_get_money_esc_ISO_symbol (const DB_CURRENCY currency)
 
char * intl_get_money_symbol_console (const DB_CURRENCY currency)
 
char * intl_get_money_symbol_grammar (const DB_CURRENCY currency)
 
char * intl_get_money_UTF8_symbol (const DB_CURRENCY currency)
 
char * intl_get_money_ISO88591_symbol (const DB_CURRENCY currency)
 
int intl_get_currency_symbol_position (const DB_CURRENCY currency)
 
int intl_count_utf8_chars (const unsigned char *s, int length_in_bytes)
 
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)
 
int intl_utf8_to_iso88591 (const unsigned char *in_buf, const int in_size, unsigned char **out_buf, int *out_size)
 
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

bool intl_Mbs_support
 
bool intl_String_validation
 
const unsigned char *const intl_Len_utf8_char
 

Macro Definition Documentation

#define INTL_CAN_COERCE_CS (   cs_from,
  cs_to 
)    true
#define INTL_CAN_STEAL_CS (   cs_from,
  cs_to 
)    ((cs_from) == (cs_to) || (cs_to) == INTL_CODESET_RAW_BYTES)

Definition at line 87 of file intl_support.h.

Referenced by tp_can_steal_string().

#define INTL_GET_NEXTCHAR_UTF8 (   c,
 
)
Value:
{ \
l = intl_Len_utf8_char[*(unsigned char*)(c)]; \
c += (l); \
}
const unsigned char *const intl_Len_utf8_char

Definition at line 71 of file intl_support.h.

Referenced by intl_identifier_mht_1strlowerhash(), and intl_nextchar_utf8().

#define INTL_NEXT_CHAR (   ptr,
  s,
  codeset,
  current_char_size 
)
Value:
do \
{ \
if (((codeset) == INTL_CODESET_ISO88591) \
|| ((codeset) == INTL_CODESET_RAW_BYTES)) \
{ \
(*(current_char_size)) = 1; \
(ptr) = (s) + 1; \
} \
else if ((codeset) == INTL_CODESET_UTF8) \
{ \
(ptr) = intl_nextchar_utf8 ((s), (current_char_size)); \
} \
else if ((codeset) == INTL_CODESET_KSC5601_EUC) \
{ \
(ptr) = intl_nextchar_euc ((s), (current_char_size)); \
} \
{ \
assert (false); \
(*(current_char_size)) = 0; \
ptr = (s); \
} \
} \
while (0)
const unsigned char * intl_nextchar_euc(const unsigned char *s, int *curr_length)
Definition: intl_support.c:777
#define assert(x)
if(extra_options)
Definition: dynamic_load.c:958
const unsigned char * intl_nextchar_utf8(const unsigned char *s, int *curr_length)
else
while(1)
Definition: cnvlex.c:816

Definition at line 99 of file intl_support.h.

Referenced by get_next_format(), intl_identifier_fix(), qstr_eval_like(), qstr_position(), and qstr_replace().

#define INTL_NEXTCHAR_UTF8 (   c)    (unsigned char*)((c) + intl_Len_utf8_char[*(unsigned char*)(c)])

Definition at line 67 of file intl_support.h.

#define WEOF   (wint_t)(-1)

Definition at line 57 of file intl_support.h.

Typedef Documentation

Definition at line 162 of file intl_support.h.

Definition at line 141 of file intl_support.h.

typedef enum intl_codeset INTL_CODESET

Definition at line 190 of file intl_support.h.

typedef unsigned int INTL_LANG

Definition at line 132 of file intl_support.h.

Definition at line 170 of file intl_support.h.

typedef enum intl_zone INTL_ZONE

Definition at line 150 of file intl_support.h.

Enumeration Type Documentation

Enumerator
CURRENCY_CHECK_MODE_NONE 
CURRENCY_CHECK_MODE_CONSOLE 
CURRENCY_CHECK_MODE_UTF8 
CURRENCY_CHECK_MODE_GRAMMAR 
CURRENCY_CHECK_MODE_ISO 
CURRENCY_CHECK_MODE_ESC_ISO 
CURRENCY_CHECK_MODE_ISO88591 

Definition at line 152 of file intl_support.h.

Enumerator
INTL_LANG_ENGLISH 
INTL_LANG_KOREAN 
INTL_LANG_TURKISH 
INTL_LANG_USER_DEF_START 

Definition at line 134 of file intl_support.h.

Enumerator
INTL_CODESET_ERROR 
INTL_CODESET_NONE 
INTL_CODESET_ASCII 
INTL_CODESET_RAW_BITS 
INTL_CODESET_RAW_BYTES 
INTL_CODESET_ISO88591 
INTL_CODESET_KSC5601_EUC 
INTL_CODESET_UTF8 
INTL_CODESET_BINARY 
INTL_CODESET_LAST 

Definition at line 175 of file intl_support.h.

Enumerator
INTL_UTF8_VALID 
INTL_UTF8_INVALID 
INTL_UTF8_TRUNCATED 

Definition at line 164 of file intl_support.h.

enum intl_zone
Enumerator
INTL_ZONE_US 
INTL_ZONE_KR 
INTL_ZONE_GB 
INTL_ZONE_TR 

Definition at line 143 of file intl_support.h.

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 
)
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 
)
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_iso88591_to_utf8 ( const unsigned char *  in_buf,
const int  in_size,
unsigned char **  out_buf,
int *  out_size 
)
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  the_char 
)

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_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_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_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_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 
)
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 *  txt_conv,
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 
)
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:

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:

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

const unsigned char* const intl_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

Definition at line 87 of file intl_support.c.

Referenced by intl_check_string(), and sysprm_load_and_init_internal().