Skip to content

Commit 246013e

Browse files
Add encoding mappings for utf16le and gb18030
1 parent 091e1d5 commit 246013e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

support/mysql_enc_to_ruby.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@
4242
"binary" => "ASCII-8BIT",
4343
"geostd8" => "NULL",
4444
"cp932" => "Windows-31J",
45-
"eucjpms" => "eucJP-ms"
45+
"eucjpms" => "eucJP-ms",
46+
"utf16le" => "UTF-16LE",
47+
"gb18030" => "GB18030",
4648
}
4749

4850
client = Mysql2::Client.new(:username => user, :password => pass, :host => host, :port => port.to_i)

support/ruby_enc_to_mysql.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@
3737
"binary" => "ASCII-8BIT",
3838
"geostd8" => nil,
3939
"cp932" => "Windows-31J",
40-
"eucjpms" => "eucJP-ms"
40+
"eucjpms" => "eucJP-ms",
41+
"utf16le" => "UTF-16LE",
42+
"gb18030" => "GB18030",
4143
}
4244

4345
puts <<-header

0 commit comments

Comments
 (0)