mysql_collations.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  1. /*
  2. * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License, version 2.0, as
  6. * published by the Free Software Foundation.
  7. *
  8. * This program is also distributed with certain software (including
  9. * but not limited to OpenSSL) that is licensed under separate terms,
  10. * as designated in a particular file or component or in included license
  11. * documentation. The authors of MySQL hereby grant you an
  12. * additional permission to link the program and your derivative works
  13. * with the separately licensed software that they have included with
  14. * MySQL.
  15. *
  16. * Without limiting anything contained in the foregoing, this file,
  17. * which is part of MySQL Connector/C++, is also subject to the
  18. * Universal FOSS Exception, version 1.0, a copy of which can be found at
  19. * http://oss.oracle.com/licenses/universal-foss-exception.
  20. *
  21. * This program is distributed in the hope that it will be useful, but
  22. * WITHOUT ANY WARRANTY; without even the implied warranty of
  23. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  24. * See the GNU General Public License, version 2.0, for more details.
  25. *
  26. * You should have received a copy of the GNU General Public License
  27. * along with this program; if not, write to the Free Software Foundation, Inc.,
  28. * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  29. */
  30. /*
  31. Lists of collations used by MySQL Server and its protocols. These lists
  32. define mapping from MySQL collation ID to charset ID.
  33. Note: Keep this file in sync with <mysql/cdk/protocol/mysqlx/collations.h>
  34. */
  35. #ifndef MYSQLX_MYSQL_COLLATIONS_H
  36. #define MYSQLX_MYSQL_COLLATIONS_H
  37. /*
  38. Each line X(CS, ID, COLL, CASE) in the expansion of
  39. a COLLATION_XXX() macro declares collation with name COLL for character set
  40. CS. ID is the MySQL id number for the collation. CASE is one of ci, cs or bin
  41. and indicates whether it is case insensitive, sensitive or binary collation,
  42. respectively.
  43. */
  44. #define COLLATIONS_big5(X) \
  45. X(big5,1,chinese,ci) \
  46. X(big5,84,bin,bin) \
  47. #define COLLATIONS_dec8(X) \
  48. X(dec8,3,swedish,ci) \
  49. X(dec8,69,bin,bin) \
  50. #define COLLATIONS_cp850(X) \
  51. X(cp850,4,general,ci) \
  52. X(cp850,80,bin,bin) \
  53. #define COLLATIONS_hp8(X) \
  54. X(hp8,6,english,ci) \
  55. X(hp8,72,bin,bin) \
  56. #define COLLATIONS_koi8r(X) \
  57. X(koi8r,7,general,ci) \
  58. X(koi8r,74,bin,bin) \
  59. #define COLLATIONS_latin1(X) \
  60. X(latin1,5,german1,ci) \
  61. X(latin1,8,swedish,ci) \
  62. X(latin1,15,danish,ci) \
  63. X(latin1,31,german2,ci) \
  64. X(latin1,47,bin,bin) \
  65. X(latin1,48,general,ci) \
  66. X(latin1,49,general,cs) \
  67. X(latin1,94,spanish,ci) \
  68. #define COLLATIONS_latin2(X) \
  69. X(latin2,2,czech,cs) \
  70. X(latin2,9,general,ci) \
  71. X(latin2,21,hungarian,ci) \
  72. X(latin2,27,croatian,ci) \
  73. X(latin2,77,bin,bin) \
  74. #define COLLATIONS_swe7(X) \
  75. X(swe7,10,swedish,ci) \
  76. X(swe7,82,bin,bin) \
  77. #define COLLATIONS_ascii(X) \
  78. X(ascii,11,general,ci) \
  79. X(ascii,65,bin,bin) \
  80. #define COLLATIONS_ujis(X) \
  81. X(ujis,12,japanese,ci) \
  82. X(ujis,91,bin,bin) \
  83. #define COLLATIONS_sjis(X) \
  84. X(sjis,13,japanese,ci) \
  85. X(sjis,88,bin,bin) \
  86. #define COLLATIONS_hebrew(X) \
  87. X(hebrew,16,general,ci) \
  88. X(hebrew,71,bin,bin) \
  89. #define COLLATIONS_tis620(X) \
  90. X(tis620,18,thai,ci) \
  91. X(tis620,89,bin,bin) \
  92. #define COLLATIONS_euckr(X) \
  93. X(euckr,19,korean,ci) \
  94. X(euckr,85,bin,bin) \
  95. #define COLLATIONS_koi8u(X) \
  96. X(koi8u,22,general,ci) \
  97. X(koi8u,75,bin,bin) \
  98. #define COLLATIONS_gb2312(X) \
  99. X(gb2312,24,chinese,ci) \
  100. X(gb2312,86,bin,bin) \
  101. #define COLLATIONS_greek(X) \
  102. X(greek,25,general,ci) \
  103. X(greek,70,bin,bin) \
  104. #define COLLATIONS_cp1250(X) \
  105. X(cp1250,26,general,ci) \
  106. X(cp1250,34,czech,cs) \
  107. X(cp1250,44,croatian,ci) \
  108. X(cp1250,66,bin,bin) \
  109. X(cp1250,99,polish,ci) \
  110. #define COLLATIONS_gbk(X) \
  111. X(gbk,28,chinese,ci) \
  112. X(gbk,87,bin,bin) \
  113. #define COLLATIONS_latin5(X) \
  114. X(latin5,30,turkish,ci) \
  115. X(latin5,78,bin,bin) \
  116. #define COLLATIONS_armscii8(X) \
  117. X(armscii8,32,general,ci) \
  118. X(armscii8,64,bin,bin) \
  119. #define COLLATIONS_utf8(X) \
  120. X(utf8,33,general,ci) \
  121. X(utf8,76,tolower,ci) \
  122. X(utf8,83,bin,bin) \
  123. X(utf8,192,unicode,ci) \
  124. X(utf8,193,icelandic,ci) \
  125. X(utf8,194,latvian,ci) \
  126. X(utf8,195,romanian,ci) \
  127. X(utf8,196,slovenian,ci) \
  128. X(utf8,197,polish,ci) \
  129. X(utf8,198,estonian,ci) \
  130. X(utf8,199,spanish,ci) \
  131. X(utf8,200,swedish,ci) \
  132. X(utf8,201,turkish,ci) \
  133. X(utf8,202,czech,ci) \
  134. X(utf8,203,danish,ci) \
  135. X(utf8,204,lithuanian,ci) \
  136. X(utf8,205,slovak,ci) \
  137. X(utf8,206,spanish2,ci) \
  138. X(utf8,207,roman,ci) \
  139. X(utf8,208,persian,ci) \
  140. X(utf8,209,esperanto,ci) \
  141. X(utf8,210,hungarian,ci) \
  142. X(utf8,211,sinhala,ci) \
  143. X(utf8,212,german2,ci) \
  144. X(utf8,213,croatian,ci) \
  145. X(utf8,214,unicode_520,ci) \
  146. X(utf8,215,vietnamese,ci) \
  147. X(utf8,223,general_mysql500,ci) \
  148. #define COLLATIONS_ucs2(X) \
  149. X(ucs2,35,general,ci) \
  150. X(ucs2,90,bin,bin) \
  151. X(ucs2,128,unicode,ci) \
  152. X(ucs2,129,icelandic,ci) \
  153. X(ucs2,130,latvian,ci) \
  154. X(ucs2,131,romanian,ci) \
  155. X(ucs2,132,slovenian,ci) \
  156. X(ucs2,133,polish,ci) \
  157. X(ucs2,134,estonian,ci) \
  158. X(ucs2,135,spanish,ci) \
  159. X(ucs2,136,swedish,ci) \
  160. X(ucs2,137,turkish,ci) \
  161. X(ucs2,138,czech,ci) \
  162. X(ucs2,139,danish,ci) \
  163. X(ucs2,140,lithuanian,ci) \
  164. X(ucs2,141,slovak,ci) \
  165. X(ucs2,142,spanish2,ci) \
  166. X(ucs2,143,roman,ci) \
  167. X(ucs2,144,persian,ci) \
  168. X(ucs2,145,esperanto,ci) \
  169. X(ucs2,146,hungarian,ci) \
  170. X(ucs2,147,sinhala,ci) \
  171. X(ucs2,148,german2,ci) \
  172. X(ucs2,149,croatian,ci) \
  173. X(ucs2,150,unicode_520,ci) \
  174. X(ucs2,151,vietnamese,ci) \
  175. X(ucs2,159,general_mysql500,ci) \
  176. #define COLLATIONS_cp866(X) \
  177. X(cp866,36,general,ci) \
  178. X(cp866,68,bin,bin) \
  179. #define COLLATIONS_keybcs2(X) \
  180. X(keybcs2,37,general,ci) \
  181. X(keybcs2,73,bin,bin) \
  182. #define COLLATIONS_macce(X) \
  183. X(macce,38,general,ci) \
  184. X(macce,43,bin,bin) \
  185. #define COLLATIONS_macroman(X) \
  186. X(macroman,39,general,ci) \
  187. X(macroman,53,bin,bin) \
  188. #define COLLATIONS_cp852(X) \
  189. X(cp852,40,general,ci) \
  190. X(cp852,81,bin,bin) \
  191. #define COLLATIONS_latin7(X) \
  192. X(latin7,20,estonian,cs) \
  193. X(latin7,41,general,ci) \
  194. X(latin7,42,general,cs) \
  195. X(latin7,79,bin,bin) \
  196. #define COLLATIONS_utf8mb4(X) \
  197. X(utf8mb4,255,uca0900_ai,ci) \
  198. X(utf8mb4,278,uca0900_as,cs) \
  199. X(utf8mb4,46,utf8mb4,bin) \
  200. X(utf8mb4,245,croatian,ci) \
  201. X(utf8mb4,266,cs_0900_ai,ci) \
  202. X(utf8mb4,289,cs_0900_as,cs) \
  203. X(utf8mb4,234,czech,ci) \
  204. X(utf8mb4,235,danish,ci) \
  205. X(utf8mb4,267,da_0900_ai,ci) \
  206. X(utf8mb4,290,da_0900_as,cs) \
  207. X(utf8mb4,256,de_pb_0900_ai,ci) \
  208. X(utf8mb4,279,de_pb_0900_as,cs) \
  209. X(utf8mb4,273,eo_0900_ai,ci) \
  210. X(utf8mb4,296,eo_0900_as,cs) \
  211. X(utf8mb4,241,esperanto,ci) \
  212. X(utf8mb4,230,estonian,ci) \
  213. X(utf8mb4,263,es_0900_ai,ci) \
  214. X(utf8mb4,286,es_0900_as,cs) \
  215. X(utf8mb4,270,es_trad_0900_ai,ci) \
  216. X(utf8mb4,293,es_trad_0900_as,cs) \
  217. X(utf8mb4,262,et_0900_ai,ci) \
  218. X(utf8mb4,285,et_0900_as,cs) \
  219. X(utf8mb4,45,general,ci) \
  220. X(utf8mb4,244,german2,ci) \
  221. X(utf8mb4,275,hr_0900_ai,ci) \
  222. X(utf8mb4,298,hr_0900_as,cs) \
  223. X(utf8mb4,242,hungarian,ci) \
  224. X(utf8mb4,274,hu_0900_ai,ci) \
  225. X(utf8mb4,297,hu_0900_as,cs) \
  226. X(utf8mb4,225,icelandic,ci) \
  227. X(utf8mb4,257,is_0900_ai,ci) \
  228. X(utf8mb4,280,is_0900_as,cs) \
  229. X(utf8mb4,303,ja_0900_as,cs) \
  230. X(utf8mb4,226,latvian,ci) \
  231. X(utf8mb4,271,la_0900_ai,ci) \
  232. X(utf8mb4,294,la_0900_as,cs) \
  233. X(utf8mb4,236,lithuanian,ci) \
  234. X(utf8mb4,268,lt_0900_ai,ci) \
  235. X(utf8mb4,291,lt_0900_as,cs) \
  236. X(utf8mb4,258,lv_0900_ai,ci) \
  237. X(utf8mb4,281,lv_0900_as,cs) \
  238. X(utf8mb4,240,persian,ci) \
  239. X(utf8mb4,261,pl_0900_ai,ci) \
  240. X(utf8mb4,284,pl_0900_as,cs) \
  241. X(utf8mb4,229,polish,ci) \
  242. X(utf8mb4,227,romanian,ci) \
  243. X(utf8mb4,239,roman,ci) \
  244. X(utf8mb4,259,ro_0900_ai,ci) \
  245. X(utf8mb4,282,ro_0900_as,cs) \
  246. X(utf8mb4,243,sinhala,ci) \
  247. X(utf8mb4,269,sk_0900_ai,ci) \
  248. X(utf8mb4,292,sk_0900_as,cs) \
  249. X(utf8mb4,237,slovak,ci) \
  250. X(utf8mb4,228,slovenian,ci) \
  251. X(utf8mb4,260,sl_0900_ai,ci) \
  252. X(utf8mb4,283,sl_0900_as,cs) \
  253. X(utf8mb4,238,spanish2,ci) \
  254. X(utf8mb4,231,spanish,ci) \
  255. X(utf8mb4,264,sv_0900_ai,ci) \
  256. X(utf8mb4,287,sv_0900_as,cs) \
  257. X(utf8mb4,232,swedish,ci) \
  258. X(utf8mb4,265,tr_0900_ai,ci) \
  259. X(utf8mb4,288,tr_0900_as,cs) \
  260. X(utf8mb4,233,turkish,ci) \
  261. X(utf8mb4,246,unicode_520,ci) \
  262. X(utf8mb4,224,unicode,ci) \
  263. X(utf8mb4,247,vietnamese,ci) \
  264. X(utf8mb4,277,vi_0900_ai,ci) \
  265. X(utf8mb4,300,vi_0900_as,cs) \
  266. #define COLLATIONS_cp1251(X) \
  267. X(cp1251,14,bulgarian,ci) \
  268. X(cp1251,23,ukrainian,ci) \
  269. X(cp1251,50,bin,bin) \
  270. X(cp1251,51,general,ci) \
  271. X(cp1251,52,general,cs) \
  272. #define COLLATIONS_utf16(X) \
  273. X(utf16,54,general,ci) \
  274. X(utf16,55,bin,bin) \
  275. X(utf16,101,unicode,ci) \
  276. X(utf16,102,icelandic,ci) \
  277. X(utf16,103,latvian,ci) \
  278. X(utf16,104,romanian,ci) \
  279. X(utf16,105,slovenian,ci) \
  280. X(utf16,106,polish,ci) \
  281. X(utf16,107,estonian,ci) \
  282. X(utf16,108,spanish,ci) \
  283. X(utf16,109,swedish,ci) \
  284. X(utf16,110,turkish,ci) \
  285. X(utf16,111,czech,ci) \
  286. X(utf16,112,danish,ci) \
  287. X(utf16,113,lithuanian,ci) \
  288. X(utf16,114,slovak,ci) \
  289. X(utf16,115,spanish2,ci) \
  290. X(utf16,116,roman,ci) \
  291. X(utf16,117,persian,ci) \
  292. X(utf16,118,esperanto,ci) \
  293. X(utf16,119,hungarian,ci) \
  294. X(utf16,120,sinhala,ci) \
  295. X(utf16,121,german2,ci) \
  296. X(utf16,122,croatian,ci) \
  297. X(utf16,123,unicode_520,ci) \
  298. X(utf16,124,vietnamese,ci) \
  299. #define COLLATIONS_utf16le(X) \
  300. X(utf16le,56,general,ci) \
  301. X(utf16le,62,bin,bin) \
  302. #define COLLATIONS_cp1256(X) \
  303. X(cp1256,57,general,ci) \
  304. X(cp1256,67,bin,bin) \
  305. #define COLLATIONS_cp1257(X) \
  306. X(cp1257,29,lithuanian,ci) \
  307. X(cp1257,58,bin,bin) \
  308. X(cp1257,59,general,ci) \
  309. #define COLLATIONS_utf32(X) \
  310. X(utf32,60,general,ci) \
  311. X(utf32,61,bin,bin) \
  312. X(utf32,160,unicode,ci) \
  313. X(utf32,161,icelandic,ci) \
  314. X(utf32,162,latvian,ci) \
  315. X(utf32,163,romanian,ci) \
  316. X(utf32,164,slovenian,ci) \
  317. X(utf32,165,polish,ci) \
  318. X(utf32,166,estonian,ci) \
  319. X(utf32,167,spanish,ci) \
  320. X(utf32,168,swedish,ci) \
  321. X(utf32,169,turkish,ci) \
  322. X(utf32,170,czech,ci) \
  323. X(utf32,171,danish,ci) \
  324. X(utf32,172,lithuanian,ci) \
  325. X(utf32,173,slovak,ci) \
  326. X(utf32,174,spanish2,ci) \
  327. X(utf32,175,roman,ci) \
  328. X(utf32,176,persian,ci) \
  329. X(utf32,177,esperanto,ci) \
  330. X(utf32,178,hungarian,ci) \
  331. X(utf32,179,sinhala,ci) \
  332. X(utf32,180,german2,ci) \
  333. X(utf32,181,croatian,ci) \
  334. X(utf32,182,unicode_520,ci) \
  335. X(utf32,183,vietnamese,ci) \
  336. #define COLLATIONS_binary(X) \
  337. X(binary,63,bin,bin) \
  338. #define COLLATIONS_geostd8(X) \
  339. X(geostd8,92,general,ci) \
  340. X(geostd8,93,bin,bin) \
  341. #define COLLATIONS_cp932(X) \
  342. X(cp932,95,japanese,ci) \
  343. X(cp932,96,bin,bin) \
  344. #define COLLATIONS_eucjpms(X) \
  345. X(eucjpms,97,japanese,ci) \
  346. X(eucjpms,98,bin,bin) \
  347. #define COLLATIONS_gb18030(X) \
  348. X(gb18030,248,chinese,ci) \
  349. X(gb18030,249,bin,bin) \
  350. X(gb18030,250,unicode_520,ci) \
  351. #endif