{"id":4613,"date":"2020-04-25T17:34:53","date_gmt":"2020-04-25T08:34:53","guid":{"rendered":"https:\/\/www.pistolfly.com\/weblog\/?p=4613"},"modified":"2023-01-12T14:58:09","modified_gmt":"2023-01-12T05:58:09","slug":"utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3","status":"publish","type":"post","link":"https:\/\/www.pistolfly.com\/weblog\/2020\/04\/utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3.html","title":{"rendered":"UTF-8\u306e4\u30d0\u30a4\u30c8\u6587\u5b57\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3"},"content":{"rendered":"\n<p>MySQL\u306e\u6587\u5b57\u30bb\u30c3\u30c8\u304cutf8\u306e\u5834\u5408\u3001utf-8\u3067\u7b26\u53f7\u5316\u3059\u308b\u30684\u30d0\u30a4\u30c8\u306b\u306a\u308b\u6587\u5b57\uff08\ud83d\ude01\u306e\u3088\u3046\u306a\u7d75\u6587\u5b57\u306a\u3069\uff09\u3092\u30bb\u30c3\u30c8\u3059\u308b\u3068\u3001SQL\u30e2\u30fc\u30c9\uff08sql_mode\uff09\u304c\u53b3\u5bc6\u30e2\u30fc\u30c9\uff08STRICT_ALL_TABLES \u307e\u305f\u306f STRICT_TRANS_TABLES \u306e\u3044\u305a\u308c\u304b\u304c\u6709\u52b9\uff09\u3067\u306a\u3044\u5834\u5408\u3001\u305d\u306e\u6587\u5b57\u4ee5\u964d\u304c\u5207\u308a\u6368\u3066\u3089\u308c\u3066\u3057\u307e\u3046\u3002\uff08\u8b66\u544a\u306f\u767a\u751f\u3059\u308b\uff09<\/p>\n\n\n\n<p>4\u30d0\u30a4\u30c8UTF-8\u6587\u5b57\u306b\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u306b\u306f\u3001CHARACTER SET \u306b utf8mb4\uff08COLLATE \u306b utf8mb4_unicode_520_ci \u306a\u3069 utf8mb4_xxx\uff09 \u3092\u6307\u5b9a\u3057\u305f\u30ab\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u3001\u63a5\u7d9a\u6587\u5b57\u30bb\u30c3\u30c8\u3082 utf8mb4 \u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n\n\n\n<p>\u3061\u306a\u307f\u306bRails\u3067\u306f\u3001MySQL\u306e\u30ab\u30e9\u30e0\u306e\u6587\u5b57\u30bb\u30c3\u30c8\u304cutf8\u306e\u5834\u5408\u306b4\u30d0\u30a4\u30c8UTF-8\u6587\u5b57\u3092\u30bb\u30c3\u30c8\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u306e\u3067\u3001\u6c17\u4ed8\u304b\u306a\u3044\u3046\u3061\u306b\u6587\u5b57\u5217\u304c\u5207\u308a\u6368\u3066\u3089\u308c\u3066\u3057\u307e\u3046\u3053\u3068\u306f\u306a\u3044\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>An ActiveRecord::StatementInvalid occurred in news#update:<\/p>\n\n\n\n<p>Mysql2::Error: Incorrect string value: '\\xF0\\x9F\\x98\\x80\\x0D\\x0A' for column 'description' at row 1: UPDATE `news` SET `description` = '\ud83d\ude00\\r\\n' WHERE `news`.`id` = 2<br \/>app\/controllers\/news_controller.rb:98:in `update'<\/p>\n<\/blockquote>\n\n\n\n<p>\u3053\u308c\u306f\u7279\u306b\u6307\u5b9a\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u3001<a aria-label=\" (opens in a new tab)\" class=\"aioseop-link\" href=\"https:\/\/github.com\/rails\/rails\/blob\/8bec77cc0f1fd47677a331a64f68c5918efd2ca9\/activerecord\/lib\/active_record\/connection_adapters\/abstract_mysql_adapter.rb#L739\" target=\"_blank\" rel=\"noreferrer noopener\">AbstractMysqlAdapter#configure_connection<\/a> \u3067\u3001STRICT_ALL_TABLES \u304c\u30bb\u30c3\u30b7\u30e7\u30f3\u306eSQL_MODE\u306b\u8ffd\u52a0\u3055\u308c\u3066\u3044\u308b\u304b\u3089\u3002\uff08NO_AUTO_VALUE_ON_ZERO \u3082\u8ffd\u52a0\u3055\u308c\u308b\u3002\uff09<br \/><br \/>\u3053\u308c\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u78ba\u8a8d\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<ul>\n<li>mysql\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3067\u78ba\u8a8d\n<pre class=\"command-line\">mysql&gt; show variables like 'sql_mode';\n+---------------+------------------------+\n| Variable_name | Value                  |\n+---------------+------------------------+\n| sql_mode      | NO_ENGINE_SUBSTITUTION |\n+---------------+------------------------+\n1 row in set (0.00 sec)\n<\/pre>\n<\/li>\n<li>\u540c\u3058\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u5bfe\u3057\u3066\u3001rails console\u3067\u78ba\u8a8d\n<pre class=\"command-line\">&gt; con = ActiveRecord::Base.connection\n&gt; con.select_all(\"SHOW VARIABLES LIKE 'sql_mode'\")\n   (0.8ms)  SHOW VARIABLES LIKE 'sql_mode'\n =&gt; #&lt;ActiveRecord::Result:0x00007fc6ca533728 @columns=[\"Variable_name\", \"Value\"], @rows=[[\"sql_mode\", \"NO_AUTO_VALUE_ON_ZERO,STRICT_ALL_TABLES,NO_ENGINE_SUBSTITUTION\"]], @hash_rows=nil, @column_types={}&gt;\n<\/pre>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u5bfe\u51e6\u65b9\u6cd5<\/h2>\n\n\n\n<p>\u30ab\u30e9\u30e0\u306e CHARACTER SET \u3092 utf8mb4 \u3001COLLATE \u3092 utf8mb4_xxx \u306b\u5909\u63db\u3057\u3066\u3001\u63a5\u7d9a\u6587\u5b57\u30bb\u30c3\u30c8\u306b utf8mb4 \u3092\u4f7f\u7528\u3059\u308c\u3070\u3088\u3044\u304c\u3001\u4f55\u3089\u304b\u306e\u4e8b\u60c5\u3067\u30ab\u30e9\u30e0\u3092 utf8mb4 \u306b\u5909\u63db\u3067\u304d\u306a\u3044\u5834\u5408\u306f\u3001\u9ed9\u3063\u30664\u30d0\u30a4\u30c8UTF-8\u6587\u5b57\u4ee5\u964d\u304c\u5207\u308a\u6368\u3066\u3089\u308c\u308b\u3068\u3044\u308d\u3044\u308d\u3068\u307e\u305a\u3044\u306e\u3067\u30014\u30d0\u30a4\u30c8\u306eUTF-8\u6587\u5b57\u3092\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3058\u304f\u3053\u3068\u306b\u306a\u308b\u3060\u308d\u3046\u3002<br \/><br \/>UTF-8\u306b\u30a8\u30f3\u30b3\u30fc\u30c9\u3059\u308b\u30684\u30d0\u30a4\u30c8\u306b\u306a\u308bUnicode\u6587\u5b57\u306e\u7bc4\u56f2\u306f\u3001U+10000\u304b\u3089U+10FFFF\u3067\u3042\u308b\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a rel=\"noreferrer noopener\" href=\"https:\/\/ja.wikipedia.org\/wiki\/UTF-8#%E3%82%A8%E3%83%B3%E3%82%B3%E3%83%BC%E3%83%89%E4%BD%93%E7%B3%BB\" target=\"_blank\" class=\"aioseop-link\">https:\/\/ja.wikipedia.org\/wiki\/UTF-8#%E3%82%A8%E3%83%B3%E3%82%B3%E3%83%BC%E3%83%89%E4%BD%93%E7%B3%BB<\/a><\/li>\n\n\n\n<li><a rel=\"noreferrer noopener\" href=\"https:\/\/ja.wikipedia.org\/wiki\/Unicode#%E9%9D%A2\" target=\"_blank\" class=\"aioseop-link\">https:\/\/ja.wikipedia.org\/wiki\/Unicode#%E9%9D%A2<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">PHP\u3067\u306e\u4f8b<\/h3>\n\n\n\n<pre class=\"prettyprint lang-php\">if (preg_match('\/[\\x{10000}-\\x{10FFFF}]\/u', $s) { \/* ... *\/ }\n<\/pre>\n<pre class=\"prettyprint lang-php\">if (preg_match('\/[\\xF0-\\xF7][\\x80-\\xBF][\\x80-\\xBF][\\x80-\\xBF]\/', $s)) { \/* ... *\/ }\n<\/pre>\n<pre class=\"prettyprint lang-php\">preg_match_all('\/[\\x{10000}-\\x{10FFFF}]\/u', $s, $matches);\n\/\/ $matches[0]\u306b4\u30d0\u30a4\u30c8utf-8\u306e\u6587\u5b57\u306e\u914d\u5217\u304c\u683c\u7d0d\u3055\u308c\u308b\u3002\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Ruby\u3067\u306e\u4f8b<\/h3>\n\n\n\n<pre class=\"prettyprint lang-rb\">if \/[\\u{10000}-\\u{10FFFF}]\/ =~ s\n  # ...\nend\n<\/pre>\n\n<pre class=\"prettyprint lang-ruby\">chars = s.scan(\/[\\u{10000}-\\u{10FFFF}]\/)\n# chars\u306b4\u30d0\u30a4\u30c8utf-8\u306e\u6587\u5b57\u306e\u914d\u5217\u304c\u683c\u7d0d\u3055\u308c\u308b\u3002\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>MySQL\u306e\u6587\u5b57\u30bb\u30c3\u30c8\u304cutf8\u306e\u5834\u5408\u3001utf-8\u3067\u7b26\u53f7\u5316\u3059\u308b\u30684\u30d0\u30a4\u30c8\u306b\u306a\u308b\u6587\u5b57\uff08\ud83d\ude01\u306e\u3088\u3046\u306a\u7d75\u6587\u5b57\u306a\u3069\uff09\u3092\u30bb\u30c3\u30c8\u3059\u308b\u3068\u3001SQL\u30e2\u30fc\u30c9\uff08sql_mode\uff09\u304c\u53b3\u5bc6\u30e2\u30fc\u30c9\uff08STRICT_ALL_TABLES \u307e\u305f\u306f STRI &hellip; <a href=\"https:\/\/www.pistolfly.com\/weblog\/2020\/04\/utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3.html\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">UTF-8\u306e4\u30d0\u30a4\u30c8\u6587\u5b57\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"ja","_original_post":"https:\/\/www.pistolfly.com\/weblog\/?p=4613","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[13,4,27],"tags":[],"class_list":["post-4613","post","type-post","status-publish","format-standard","hentry","category-mysql","category-php","category-ruby","ja"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>UTF-8\u306e4\u30d0\u30a4\u30c8\u6587\u5b57\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3 - Pistolfly<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pistolfly.com\/weblog\/2020\/04\/utf-8\u306e4\u30d0\u30a4\u30c8\u6587\u5b57\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3.html\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"UTF-8\u306e4\u30d0\u30a4\u30c8\u6587\u5b57\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3 - Pistolfly\" \/>\n<meta property=\"og:description\" content=\"MySQL\u306e\u6587\u5b57\u30bb\u30c3\u30c8\u304cutf8\u306e\u5834\u5408\u3001utf-8\u3067\u7b26\u53f7\u5316\u3059\u308b\u30684\u30d0\u30a4\u30c8\u306b\u306a\u308b\u6587\u5b57\uff08\ud83d\ude01\u306e\u3088\u3046\u306a\u7d75\u6587\u5b57\u306a\u3069\uff09\u3092\u30bb\u30c3\u30c8\u3059\u308b\u3068\u3001SQL\u30e2\u30fc\u30c9\uff08sql_mode\uff09\u304c\u53b3\u5bc6\u30e2\u30fc\u30c9\uff08STRICT_ALL_TABLES \u307e\u305f\u306f STRI &hellip; \u7d9a\u304d\u3092\u8aad\u3080 UTF-8\u306e4\u30d0\u30a4\u30c8\u6587\u5b57\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3 &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pistolfly.com\/weblog\/2020\/04\/utf-8\u306e4\u30d0\u30a4\u30c8\u6587\u5b57\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3.html\" \/>\n<meta property=\"og:site_name\" content=\"Pistolfly\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-25T08:34:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-12T05:58:09+00:00\" \/>\n<meta name=\"author\" content=\"Pistolfly\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pistolfly\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2020\\\/04\\\/utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2020\\\/04\\\/utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3.html\"},\"author\":{\"name\":\"Pistolfly\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\"},\"headline\":\"UTF-8\u306e4\u30d0\u30a4\u30c8\u6587\u5b57\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\",\"datePublished\":\"2020-04-25T08:34:53+00:00\",\"dateModified\":\"2023-01-12T05:58:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2020\\\/04\\\/utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3.html\"},\"wordCount\":140,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\"},\"articleSection\":[\"MySQL\",\"PHP\",\"Ruby\"],\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2020\\\/04\\\/utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2020\\\/04\\\/utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3.html\",\"url\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2020\\\/04\\\/utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3.html\",\"name\":\"UTF-8\u306e4\u30d0\u30a4\u30c8\u6587\u5b57\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3 - Pistolfly\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#website\"},\"datePublished\":\"2020-04-25T08:34:53+00:00\",\"dateModified\":\"2023-01-12T05:58:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2020\\\/04\\\/utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3.html#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2020\\\/04\\\/utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2020\\\/04\\\/utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u30db\u30fc\u30e0\",\"item\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"UTF-8\u306e4\u30d0\u30a4\u30c8\u6587\u5b57\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#website\",\"url\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/\",\"name\":\"Pistolfly\",\"description\":\"Developer Blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\",\"name\":\"Pistolfly\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\",\"caption\":\"Pistolfly\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\"},\"description\":\"Software Engineer in Tokyo, Japan\",\"url\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/author\\\/pistolfly\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"UTF-8\u306e4\u30d0\u30a4\u30c8\u6587\u5b57\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3 - Pistolfly","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pistolfly.com\/weblog\/2020\/04\/utf-8\u306e4\u30d0\u30a4\u30c8\u6587\u5b57\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3.html","og_locale":"ja_JP","og_type":"article","og_title":"UTF-8\u306e4\u30d0\u30a4\u30c8\u6587\u5b57\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3 - Pistolfly","og_description":"MySQL\u306e\u6587\u5b57\u30bb\u30c3\u30c8\u304cutf8\u306e\u5834\u5408\u3001utf-8\u3067\u7b26\u53f7\u5316\u3059\u308b\u30684\u30d0\u30a4\u30c8\u306b\u306a\u308b\u6587\u5b57\uff08\ud83d\ude01\u306e\u3088\u3046\u306a\u7d75\u6587\u5b57\u306a\u3069\uff09\u3092\u30bb\u30c3\u30c8\u3059\u308b\u3068\u3001SQL\u30e2\u30fc\u30c9\uff08sql_mode\uff09\u304c\u53b3\u5bc6\u30e2\u30fc\u30c9\uff08STRICT_ALL_TABLES \u307e\u305f\u306f STRI &hellip; \u7d9a\u304d\u3092\u8aad\u3080 UTF-8\u306e4\u30d0\u30a4\u30c8\u6587\u5b57\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3 &rarr;","og_url":"https:\/\/www.pistolfly.com\/weblog\/2020\/04\/utf-8\u306e4\u30d0\u30a4\u30c8\u6587\u5b57\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3.html","og_site_name":"Pistolfly","article_published_time":"2020-04-25T08:34:53+00:00","article_modified_time":"2023-01-12T05:58:09+00:00","author":"Pistolfly","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"Pistolfly","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"1\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pistolfly.com\/weblog\/2020\/04\/utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3.html#article","isPartOf":{"@id":"https:\/\/www.pistolfly.com\/weblog\/2020\/04\/utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3.html"},"author":{"name":"Pistolfly","@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab"},"headline":"UTF-8\u306e4\u30d0\u30a4\u30c8\u6587\u5b57\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3","datePublished":"2020-04-25T08:34:53+00:00","dateModified":"2023-01-12T05:58:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pistolfly.com\/weblog\/2020\/04\/utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3.html"},"wordCount":140,"commentCount":0,"publisher":{"@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab"},"articleSection":["MySQL","PHP","Ruby"],"inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pistolfly.com\/weblog\/2020\/04\/utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pistolfly.com\/weblog\/2020\/04\/utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3.html","url":"https:\/\/www.pistolfly.com\/weblog\/2020\/04\/utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3.html","name":"UTF-8\u306e4\u30d0\u30a4\u30c8\u6587\u5b57\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3 - Pistolfly","isPartOf":{"@id":"https:\/\/www.pistolfly.com\/weblog\/#website"},"datePublished":"2020-04-25T08:34:53+00:00","dateModified":"2023-01-12T05:58:09+00:00","breadcrumb":{"@id":"https:\/\/www.pistolfly.com\/weblog\/2020\/04\/utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3.html#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pistolfly.com\/weblog\/2020\/04\/utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pistolfly.com\/weblog\/2020\/04\/utf-8%e3%81%ae4%e3%83%90%e3%82%a4%e3%83%88%e6%96%87%e5%ad%97%e3%81%ae%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/www.pistolfly.com\/weblog"},{"@type":"ListItem","position":2,"name":"UTF-8\u306e4\u30d0\u30a4\u30c8\u6587\u5b57\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3"}]},{"@type":"WebSite","@id":"https:\/\/www.pistolfly.com\/weblog\/#website","url":"https:\/\/www.pistolfly.com\/weblog\/","name":"Pistolfly","description":"Developer Blog","publisher":{"@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pistolfly.com\/weblog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":["Person","Organization"],"@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab","name":"Pistolfly","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g","caption":"Pistolfly"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g"},"description":"Software Engineer in Tokyo, Japan","url":"https:\/\/www.pistolfly.com\/weblog\/author\/pistolfly"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/paorzz-1cp","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts\/4613","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/comments?post=4613"}],"version-history":[{"count":35,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts\/4613\/revisions"}],"predecessor-version":[{"id":4912,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts\/4613\/revisions\/4912"}],"wp:attachment":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/media?parent=4613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/categories?post=4613"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/tags?post=4613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}