public function value($encoding = null)
    {
        if ($this->value !== null) {
            if ($encoding === null) {
                return mb_convert_encoding($this->value, $this->encoding, 'UTF-8');
            } else {
                $encoding = $this->getRealEncoding($encoding);
                return mb_convert_encoding($this->value, $encoding, 'UTF-8');
            }
        }
    }