- var_dump: documentation ( source)
- mb_detect_encoding: documentation ( source)
<?php
var_dump(mb_detect_encoding("\x19", "ASCII, 7bit, 8bit", true));
var_dump(mb_detect_encoding("\x20", "ASCII, 7bit, 8bit", true));
var_dump(mb_detect_encoding("\x21", "ASCII, 7bit, 8bit", true));
var_dump(mb_detect_encoding("\xA1", "ASCII, 7bit, 8bit", true));