エスケープ処理に対する理解
エスケープ処理はHTML上で特殊文字を表示するための処理である。
この行為自体はエンコードに近い。
なので、一件htmlspecialcharsはエスケープ処理をしているように見えるが、正しくはエンコード処理でもある
code:php
string htmlspecialchars ( string $string int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ini_get("default_charset") , bool $double_encode = TRUE ] ) 引数にエンコードを指定する
参考