{"height":"190","image_url":null,"blog_url":"https://iww.hateblo.jp/","type":"rich","published":"2016-01-11 00:00:00","provider_name":"Hatena Blog","title":" BOM\u3042\u308a\u30d5\u30a1\u30a4\u30eb\u3092\u63a2\u3059","provider_url":"https://hatena.blog","author_name":"iww","version":"1.0","url":"https://iww.hateblo.jp/entry/20160111/bom","categories":["PHP"],"width":"100%","description":"\u982d\u304b\u3089\u4f55\u30d0\u30a4\u30c8\u304b\u8aad\u307f\u51fa\u3057\u3066\u3001 \u5148\u982d\u304c0xEF\u3060\u3063\u305f\u3089 BOM\u3042\u308a CR+LF\u304c\u3042\u3063\u305f\u3089 CR+LF #\u3084 \u3068\u770b\u505a\u3057\u3066\u5f15\u3063\u639b\u304b\u3063\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u4e00\u89a7\u3092\u4f5c\u6210\u3059\u308b #!/usr/bin/php -q <? array_shift($argv); while( $f=array_shift($argv) ){ if($fp = fopen($f,\"r\")){ $str = fread($fp,20); if( preg_match('/^\\xef/', $str) ) echo(\"$f: BOM\u3042\u308a\\n\"); if( preg_match('/\\x0d\\x0a/', $str) ) echo(\"$f: C\u2026","author_url":"https://blog.hatena.ne.jp/iww/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fiww.hateblo.jp%2Fentry%2F20160111%2Fbom\" title=\" BOM\u3042\u308a\u30d5\u30a1\u30a4\u30eb\u3092\u63a2\u3059 - \u63ee\u767a\u6027\u306e\u30e1\u30e2\uff12\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_title":"\u63ee\u767a\u6027\u306e\u30e1\u30e2\uff12"}