protected function buildDetectOrder()
    {

        $detectOrder = [];

        foreach ($this->defaultDetectOrder as $i=>$charset) {
            if ($this->converter->canConvert($charset)) {
                $detectOrder[] = $charset;
            }
        }

        return $detectOrder;

    }