// UTF-8 if (preg_match('/^[\x0x\xef][\x0x\xbb][\x0x\xbf]/', $str)) { // UTF-8 BOMä»ã // BOMä»ãããBOMç¡ã㸠$str = substr($str, 3); } else { // UTF-8 BOMç¡ã } // UTF-16BEã¯FE FF if (preg_match('/^[\x0x\xfe][\x0x\xff]/', $str)) { // UTF-16BE BOMä»ã } // UTF-16LEã¯FF FE if (preg_match('/^[\x0x\xff][\x0x\xfe]/', $str)) { // UTF-16LE BOMä»ã }
{{#tags}}- {{label}}
{{/tags}}