protected function findCharsetByBOM($bom)
    {
        foreach ($this->byteOrderMarks as $charset=>$knownBom) {
            if ($knownBom === $bom) {
                return $charset;
            }
        }

        return '';

    }
protected function findCharsetByBOM($bom)
    {
        foreach ($this->byteOrderMarks as $charset=>$knownBom) {
            if ($knownBom === $bom) {
                return $charset;
            }
        }

        return '';

    }
protected function findCharsetByBOM ( $ bom ) { foreach ( $ this -> byteOrderMarks as $ charset => $ knownBom ) { if ( $ knownBom === $ bom ) { return $ charset ; } } return '' ; }
Detect the charset by bom.

@param string $bom

@return string
Detect the charset by bom .