public function analyseUNB($encoding)
    {
        if (\is_array($encoding)) {
            $encoding = $encoding[0];
        }

        $this->encoding = $encoding;

        // If there's a regex defined for this character set, use it.
        /** @noinspection OffsetOperationsInspection */
        if (isset(self::$encodingToStripChars[$encoding])) {
            /** @noinspection OffsetOperationsInspection */
            $this->setStripRegex(self::$encodingToStripChars[$encoding]);
        }

        $this->unbChecked = true;
    }
public function analyseUNB($encoding)
    {
        if (\is_array($encoding)) {
            $encoding = $encoding[0];
        }

        $this->encoding = $encoding;

        // If there's a regex defined for this character set, use it.
        /** @noinspection OffsetOperationsInspection */
        if (isset(self::$encodingToStripChars[$encoding])) {
            /** @noinspection OffsetOperationsInspection */
            $this->setStripRegex(self::$encodingToStripChars[$encoding]);
        }

        $this->unbChecked = true;
    }
public function analyseUNB ( $ encoding ) { if ( \ is_array ( $ encoding ) ) { $ encoding = $ encoding [ 0 ] ; } $ this -> encoding = $ encoding ; // If there's a regex defined for this character set, use it. /** @noinspection OffsetOperationsInspection */ if ( isset ( self :: $ encodingToStripChars [ $ encoding ] ) ) { /** @noinspection OffsetOperationsInspection */ $ this -> setStripRegex ( self :: $ encodingToStripChars [ $ encoding ] ) ; } $ this -> unbChecked = true ; }
UNB line analysis

@param string|string[] $encoding UNB definition line (without UNB tag). Example UNOA:2

@return void
UNB line analysis