mysql_enable_utf8 => 1 㧠DBIC::UTF8Columns è¦ããªããªãã£ã½ã
追è¨ã§ã
ã³ã¡ã³ãã¨ブクマã§ä»ã®ã¨ãã experimental ã¨æ¸ãã¦ãããï¼ ã¨æãã¦ãããã¾ãããæ°ã¥ãã¦ãªãã£ãã§ããid:nihen ãããã³ã¡ã³ãããã人ããããã¨ãã
This option is experimental and may change in future versions.
Catalyst::Wiki ãããæ¸ããæ¹ãè¯ãããã§ãããæ¸ããã®ããªã
ããã«ãã¦ããDBD å´ã§ã§ããã¨è¯ãã«è¶ãããã¨ãªãã®ã§ãæ©ã確å®ãã¦æ¬²ããã§ããï¼
追è¨2
ãã¼ãã§ãããã4.00ãããã£ã¨ãã®ã¾ã¾ã ããããã2å¹´ããã experimental ãªãã§ããw
Catalyst::Wiki ã«æ¸ãã¦æ¥ã¡ãã£ããã©w
ããããå ã®å 容
lyokato ããçµç±ã§ woremacx ããã«æãã¦ããã£ã Using Unicode - Catalyst::Wiki ã«æ¸ãã¦ãã£ã
use base 'Catalyst::Model::DBIC::Schema'; __PACKAGE__->config( schema_class => 'MyApp::Schema', connect_info => [ 'dbi:mysql:database:host', 'username', 'password', { AutoCommit => 1, RaiseError => 1, mysql_enable_utf8 => 1, # PostgreSQL: "pg_enable_utf8 => 1" on_connect_do => [ "SET NAMES 'utf8'", # PostgreSQL: "SET client_encoding=UTF8" "SET CHARACTER SET 'utf8'", ], }, ] );
å¤åãSET NAMES ã¨ãã¯ãã¼ãã«ä½ãã¨ãã« CHARACTER SET utf8 ã¨ãããã°è¦ããªããªãæ°ãããã
ãã§ããã® mysql_enable_utf8 㯠DBD::mysql ã«ããã®ã§ãDBIx::Class é¢ä¿ãªã使ããã£ã½ãã§ãã
When set, a data retrieved from a textual column type (char, varchar, etc) will have the UTF-8 flag turned on if necessary. This enables character semantics on that string. You will also need to ensure that your database / table / column is configured to use UTF8. See Chapter 10 of the mysql manual for details.