285
Resolve character set by the character set name (utf8, latin1, ...).
287
The function tries to resolve character set by the specified name. If
288
there is character set with the given name, it is assigned to the "cs"
289
parameter and false is returned. If there is no such character set,
290
"default_cs" is assigned to the "cs" and true is returned.
292
@param[in] cs_name Character set name.
293
@param[in] default_cs Default character set.
294
@param[out] cs Variable to store character set.
296
@return false if character set was resolved successfully; true if there
297
is no character set with given name.
300
bool resolve_charset(const char *cs_name,
301
const CHARSET_INFO *default_cs,
302
const CHARSET_INFO **cs)
304
*cs= get_charset_by_csname(cs_name, MY_CS_PRIMARY);
317
Resolve collation by the collation name (utf8_general_ci, ...).
319
The function tries to resolve collation by the specified name. If there
320
is collation with the given name, it is assigned to the "cl" parameter
321
and false is returned. If there is no such collation, "default_cl" is
322
assigned to the "cl" and true is returned.
324
@param[out] cl Variable to store collation.
325
@param[in] cl_name Collation name.
326
@param[in] default_cl Default collation.
328
@return false if collation was resolved successfully; true if there is no
329
collation with given name.
332
bool resolve_collation(const char *cl_name,
333
const CHARSET_INFO *default_cl,
334
const CHARSET_INFO **cl)
336
*cl= get_charset_by_name(cl_name);
348
284
#ifdef BACKSLASH_MBTAIL
349
285
static CHARSET_INFO *fs_cset_cache= NULL;