Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MySQLと文字コードの話

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
Avatar for nombom7 nombom7
January 22, 2020
120

 MySQLと文字コードの話

Avatar for nombom7

nombom7

January 22, 2020
Tweet

Transcript

  1. 文字集合 エンコーディング 規格 実装(符号化) charset JIS X 0208 JIS X

    0201 US-ASCII Shift-JIS EUC-JP Windows-31J sjis ujis cp938 複数の文字集合を組み合わせ MySQLの世界
  2. 照合規則 A:a : は:ば:ハ や:ゃ general_ci = = ≠ ≠

    bin ≠ ≠ ≠ ≠ unicode_ci = = = = unicode_520_ci = ≠ = = 引用元:Qiita記事「寿司ビール問題① 初心者→中級者へのSTEP20/25」
  3. collation A:a : は:ば:ハ や:ゃ general_ci = = ≠ ≠

    bin ≠ ≠ ≠ ≠ unicode_ci = = = = unicode_520_ci = ≠ = = これ
  4. 'collation' => 'utf8mb4_bin', $table->collation = 'utf8mb4_bin’; $table-> string('columnName’)-> Collate(‘utf8mb4_bin’); ①

    ② ③ ./config/database.php ./database/migrations/[ファイル名].php DB TABLE カラム