Are there any potential issues with the current implementation of the code for checking encoding?

The current implementation of the code for checking encoding does not account for all possible character encodings, which may lead to inaccurate results or false positives. To solve this issue, we can use the `mb_detect_encoding` function in PHP, which is more reliable and supports a wider range of encodings.

function checkEncoding($string) {
    $encoding = mb_detect_encoding($string);
    
    if ($encoding === false) {
        return "Unknown";
    }
    
    return $encoding;
}