Created
December 5, 2011 15:14
-
-
Save smallstyle/1433903 to your computer and use it in GitHub Desktop.
utf8mb4 support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/mysql2/client.rb b/lib/mysql2/client.rb | |
index 20ed442..8497ca0 100644 | |
--- a/lib/mysql2/client.rb | |
+++ b/lib/mysql2/client.rb | |
@@ -87,6 +87,7 @@ module Mysql2 | |
"ucs2" => Encoding::UTF_16BE, | |
"ujis" => Encoding::EucJP_ms, | |
"utf8" => Encoding::UTF_8, | |
+ "utf8mb4" => Encoding::UTF_8, | |
} | |
MYSQL_CHARSET_MAP = { | |
@@ -134,6 +135,7 @@ module Mysql2 | |
42 => {:name => "latin7", :collation => "latin7_general_cs"}, | |
43 => {:name => "macce", :collation => "macce_bin"}, | |
44 => {:name => "cp1250", :collation => "cp1250_croatian_ci"}, | |
+ 45 => {:name => "utf8mb4", :collation => "utf8mb4_general_ci"}, | |
47 => {:name => "latin1", :collation => "latin1_bin"}, | |
48 => {:name => "latin1", :collation => "latin1_general_ci"}, | |
49 => {:name => "latin1", :collation => "latin1_general_cs"}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment