- mb_detect_encoding: documentation ( source)
- mb_check_encoding: documentation ( source)
- quoted_printable_decode: documentation ( source)
<?php
$test = quoted_printable_decode('Piotr Iksi=F1ski');
echo mb_check_encoding($test, 'UTF-8') ? "valid:" : "invalid:";
echo mb_detect_encoding($test, 'ASCII,UTF-8', true) ?: 'false';