mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:43:02 +01:00
Fixed registration and use of custom character sets
This commit is contained in:
parent
ea38931c6c
commit
ef83b131b3
@ -608,7 +608,10 @@ USHORT METD_get_charset_bpc(dsql_req* request, SSHORT charset_id)
|
||||
Firebird::MetaName cs_name = METD_get_charset_name(request, charset_id);
|
||||
cs_sym = METD_get_charset(request, cs_name.length(), cs_name.c_str());
|
||||
}
|
||||
return cs_sym->intlsym_bytes_per_char;
|
||||
|
||||
fb_assert(cs_sym);
|
||||
|
||||
return cs_sym ? cs_sym->intlsym_bytes_per_char : 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -80,8 +80,8 @@
|
||||
#define INTL_GET_TTYPE(dsc) \
|
||||
((dsc)->dsc_sub_type)
|
||||
|
||||
#define INTL_GET_CHARSET(dsc) ((SCHAR)((dsc)->dsc_sub_type & 0x00FF))
|
||||
#define INTL_GET_COLLATE(dsc) ((SCHAR)((dsc)->dsc_sub_type >> 8))
|
||||
#define INTL_GET_CHARSET(dsc) ((UCHAR)((dsc)->dsc_sub_type & 0x00FF))
|
||||
#define INTL_GET_COLLATE(dsc) ((UCHAR)((dsc)->dsc_sub_type >> 8))
|
||||
|
||||
|
||||
/* Define tests for international data */
|
||||
|
@ -40,9 +40,13 @@ begin
|
||||
break;
|
||||
end
|
||||
|
||||
insert into rdb$types
|
||||
(rdb$field_name, rdb$type, rdb$type_name, rdb$system_flag)
|
||||
values ('RDB$CHARACTER_SET_NAME', :id, :name, 0);
|
||||
|
||||
insert into rdb$character_sets
|
||||
(rdb$character_set_name, rdb$character_set_id, rdb$system_flag, rdb$bytes_per_character)
|
||||
values (:name, :id, 0, :max_bytes_per_character);
|
||||
(rdb$character_set_name, rdb$character_set_id, rdb$system_flag, rdb$bytes_per_character, rdb$default_collate_name)
|
||||
values (:name, :id, 0, :max_bytes_per_character, :name);
|
||||
|
||||
insert into rdb$collations
|
||||
(rdb$collation_name, rdb$collation_id, rdb$character_set_id, rdb$system_flag)
|
||||
|
Loading…
Reference in New Issue
Block a user