1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00
SqMod/vendor/MDBC/man/mysql_set_character_set.3
2021-09-21 20:59:01 +03:00

252 lines
2.9 KiB
Groff

.\"t
.\" Automatically generated by Pandoc 2.5
.\"
.TH "mysql_set_character_set" "3" "" "Version 3.2.2" "MariaDB Connector/C"
.hy
.SS Name
.PP
mysql_set_character_set \- Sets the default character set for connection
.SS Synopsis
.IP
.nf
\f[C]
#include <mysql.h>
int mysql_set_character_set(MYSQL * mysql,
const char * csname);
\f[R]
.fi
.SS Description
.PP
Sets the default
[data\-types\-character\-sets\-and\-collations()](character set]] for
the current connection.
Returns zero on success, non\-zero on failure.
.SS Parameters
.IP \[bu] 2
\f[C]mysql\f[R] \- a mysql handle, which was previously allocated by
mysql_init() (mysql_init) or \f[B]mysql_real_connect(3)\f[R].
.IP \[bu] 2
\f[C]csname\f[R] \- character set name ### Notes
.IP \[bu] 2
It\[cq]s strongly recommended to use mysql_set_character_set() instead
of \f[C]SET NAMES ...\f[R] since \f[B]mysql_real_escape_string(3)\f[R]
might fail or deliver unexpected results.
.SS Return value
.PP
Zero on success, non zero if an error occured
.SS Supported character sets
.PP
The client library supports the following character sets:
.PP
.TS
tab(@);
lw(35.0n) lw(35.0n).
T{
Character set
T}@T{
Description
T}
_
T{
armscii8
T}@T{
8 bit character set for Armenian
T}
T{
ascii
T}@T{
US ASCII character set
T}
T{
big5
T}@T{
2 byte character set for traditional Chinese, Hongkong, Macau and Taiwan
T}
T{
binary
T}@T{
8 bit binary character set
T}
T{
cp1250
T}@T{
Windows code page 1250 character set
T}
T{
cp1251
T}@T{
Windows code page 1251 character set
T}
T{
cp1256
T}@T{
Windows code page 1256 character set
T}
T{
cp1257
T}@T{
Windows code page 1257 character set
T}
T{
cp850
T}@T{
MS\-DOS Codepage 850 (Western Europe)
T}
T{
cp852
T}@T{
MS\-DOS Codepage 852 (Middle Europe)
T}
T{
cp866
T}@T{
MS\-DOS Codepage 866 (Russian)
T}
T{
cp932
T}@T{
Microsoft Codepage 932 (Extension to sjis)
T}
T{
dec8
T}@T{
DEC West European
T}
T{
eucjpms
T}@T{
UJIS for Windows Japanese
T}
T{
euckr
T}@T{
EUC KR\-Korean
T}
T{
gb2312
T}@T{
GB\-2312 simplified Chinese
T}
T{
gbk
T}@T{
GBK simplified Chinese
T}
T{
geostd8
T}@T{
GEOSTD8 Georgian
T}
T{
greek
T}@T{
ISO 8859\-7 Greek
T}
T{
hebrew
T}@T{
ISO 8859\-8 Hebrew
T}
T{
hp8
T}@T{
HP West European
T}
T{
keybcs2
T}@T{
DOS Kamenicky Czech\-Slovak
T}
T{
koi8r
T}@T{
KOI8\-R Relcom Russian
T}
T{
koi8u
T}@T{
KOI8\-U Ukrainian
T}
T{
latin1
T}@T{
CP1252 Western European
T}
T{
latin2
T}@T{
ISO 8859\-2 Central Europe
T}
T{
latin5
T}@T{
ISO 8859\-9 Turkish
T}
T{
latin7
T}@T{
ISO 8859\-13 Baltic
T}
T{
macce
T}@T{
MAC Central European
T}
T{
macroman
T}@T{
MAC Western European
T}
T{
sjis
T}@T{
SJIS for Windows Japanese
T}
T{
swe7
T}@T{
7\-bit Swedish
T}
T{
tis620
T}@T{
TIS620 Thai
T}
T{
ucs2
T}@T{
UCS\-2 Unicode
T}
T{
ujis
T}@T{
EUC\-JP Japanese
T}
T{
utf8
T}@T{
UTF\-8 Unicode
T}
T{
utf16
T}@T{
UTF\-16 Unicode
T}
T{
utf32
T}@T{
UTF\-32 Unicode
T}
T{
utf8mb4
T}@T{
UTF 4\-byte Unicode
T}
.TE
.SS See also
.IP \[bu] 2
\f[B]mysql_get_character_set_info(3)\f[R]
.IP \[bu] 2
\f[B]mysql_real_escape_string(3)\f[R]