Skip to content
This repository
Browse code

add utf8mb4 charset

  • Loading branch information...
commit 1878a75fe19a92767048d010a75af77af32ab3e5 1 parent b3a220b
TOMITA Masahiro authored December 21, 2011 brianmario committed December 20, 2011

Showing 1 changed file with 22 additions and 0 deletions. Show diff stats Hide diff stats

  1. 22  lib/mysql2/client.rb
22  lib/mysql2/client.rb
@@ -87,6 +87,7 @@ def self.default_query_options
87 87
         "ucs2"     => Encoding::UTF_16BE,
88 88
         "ujis"     => Encoding::EucJP_ms,
89 89
         "utf8"     => Encoding::UTF_8,
  90
+        "utf8mb4"  => Encoding::UTF_8,
90 91
       }
91 92
 
92 93
       MYSQL_CHARSET_MAP = {
@@ -134,6 +135,8 @@ def self.default_query_options
134 135
         42 => {:name => "latin7",   :collation => "latin7_general_cs"},
135 136
         43 => {:name => "macce",    :collation => "macce_bin"},
136 137
         44 => {:name => "cp1250",   :collation => "cp1250_croatian_ci"},
  138
+        45 => {:name => "utf8mb4",  :collation => "utf8mb4_general_ci"},
  139
+        46 => {:name => "utf8mb4",  :collation => "utf8mb4_bin"},
137 140
         47 => {:name => "latin1",   :collation => "latin1_bin"},
138 141
         48 => {:name => "latin1",   :collation => "latin1_general_ci"},
139 142
         49 => {:name => "latin1",   :collation => "latin1_general_cs"},
@@ -218,6 +221,25 @@ def self.default_query_options
218 221
         208 => {:name => "utf8",    :collation => "utf8_persian_ci"},
219 222
         209 => {:name => "utf8",    :collation => "utf8_esperanto_ci"},
220 223
         210 => {:name => "utf8",    :collation => "utf8_hungarian_ci"},
  224
+        224 => {:name => "utf8mb4", :collation => "utf8mb4_unicode_ci"},
  225
+        225 => {:name => "utf8mb4", :collation => "utf8mb4_icelandic_ci"},
  226
+        226 => {:name => "utf8mb4", :collation => "utf8mb4_latvian_ci"},
  227
+        227 => {:name => "utf8mb4", :collation => "utf8mb4_romanian_ci"},
  228
+        228 => {:name => "utf8mb4", :collation => "utf8mb4_slovenian_ci"},
  229
+        229 => {:name => "utf8mb4", :collation => "utf8mb4_polish_ci"},
  230
+        230 => {:name => "utf8mb4", :collation => "utf8mb4_estonian_ci"},
  231
+        231 => {:name => "utf8mb4", :collation => "utf8mb4_spanish_ci"},
  232
+        232 => {:name => "utf8mb4", :collation => "utf8mb4_swedish_ci"},
  233
+        233 => {:name => "utf8mb4", :collation => "utf8mb4_turkish_ci"},
  234
+        234 => {:name => "utf8mb4", :collation => "utf8mb4_czech_ci"},
  235
+        235 => {:name => "utf8mb4", :collation => "utf8mb4_danish_ci"},
  236
+        236 => {:name => "utf8mb4", :collation => "utf8mb4_lithuanian_ci"},
  237
+        237 => {:name => "utf8mb4", :collation => "utf8mb4_slovak_ci"},
  238
+        238 => {:name => "utf8mb4", :collation => "utf8mb4_spanish2_ci"},
  239
+        239 => {:name => "utf8mb4", :collation => "utf8mb4_roman_ci"},
  240
+        240 => {:name => "utf8mb4", :collation => "utf8mb4_persian_ci"},
  241
+        241 => {:name => "utf8mb4", :collation => "utf8mb4_esperanto_ci"},
  242
+        242 => {:name => "utf8mb4", :collation => "utf8mb4_hungarian_ci"},
221 243
         254 => {:name => "utf8",    :collation => "utf8_general_cs"}
222 244
       }
223 245
 

0 notes on commit 1878a75

Please sign in to comment.
Something went wrong with that request. Please try again.