utf8_decode example


                'netto' => $netto,
                'bid' => $bid,
                'voucher' => $voucher,
                'date' => $date,
                'delivery_date' => $delivery_date,
                'shippingCostsAsPosition' => true,
                '_renderer' => $renderer,
                '_preview' => $this->Request()->preview,
                '_previewForcePagebreak' => $this->Request()->pagebreak,
                '_previewSample' => $this->Request()->sampleData,
                'docComment' => utf8_decode($this->Request()->docComment),
                'forceTaxCheck' => $this->Request()->forceTaxCheck,
            ]
        );

        $document->render();
    }

    /** * Duplicate document properties */
    public function duplicatePropertiesAction()
    {
if ('\\' === \DIRECTORY_SEPARATOR && !function_exists('sapi_windows_vt100_support')) {
    function sapi_windows_vt100_support($stream$enable = null) { return p\Php72::sapi_windows_vt100_support($stream$enable)}
}
if (!function_exists('stream_isatty')) {
    function stream_isatty($stream) { return p\Php72::stream_isatty($stream)}
}
if (!function_exists('utf8_encode')) {
    function utf8_encode($string) { return p\Php72::utf8_encode($string)}
}
if (!function_exists('utf8_decode')) {
    function utf8_decode($string) { return p\Php72::utf8_decode($string)}
}
if (!function_exists('spl_object_id')) {
    function spl_object_id($object) { return p\Php72::spl_object_id($object)}
}
if (!function_exists('mb_ord')) {
    function mb_ord($string$encoding = null) { return p\Php72::mb_ord($string$encoding)}
}
if (!function_exists('mb_chr')) {
    function mb_chr($codepoint$encoding = null) { return p\Php72::mb_chr($codepoint$encoding)}
}
if (!function_exists('mb_scrub')) {
    


    public static function strlen1($s$encoding = null)
    {
        if (null === $encoding) {
            $encoding = self::$internalEncoding;
        }
        if (0 !== stripos($encoding, 'utf-8') && false === $s = self::iconv($encoding, 'utf-8', $s)) {
            return false;
        }

        return \strlen(utf8_decode($s));
    }

    public static function strlen2($s$encoding = null)
    {
        if (null === $encoding) {
            $encoding = self::$internalEncoding;
        }
        if (0 !== stripos($encoding, 'utf-8') && false === $s = self::iconv($encoding, 'utf-8', $s)) {
            return false;
        }

        


    /** * UTF-8 => ISO-8859-1 * * @param string $string * * @return string */
    public static function iconv_fallback_utf8_iso88591($string) {
        if (function_exists('utf8_decode')) {
            return utf8_decode($string);
        }
        // utf8_decode() unavailable, use getID3()'s iconv_fallback() conversions (possibly PHP is compiled without XML support)         $newcharstring = '';
        $offset = 0;
        $stringlength = strlen($string);
        while ($offset < $stringlength) {
            if ((ord($string[$offset]) | 0x07) == 0xF7) {
                // 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb                 $charval = ((ord($string[($offset + 0)]) & 0x07) << 18) &
                           ((ord($string[($offset + 1)]) & 0x3F) << 12) &
                           ((ord($string[($offset + 2)]) & 0x3F) <<  6) &
                            (
$string = preg_replace('#[\r\n]+#m', ' ', $string);
                } elseif ($this->sSettings['escaped_line_separator'] != $this->sSettings['line_separator']) {
                    $string = str_replace($this->sSettings['line_separator']$this->sSettings['escaped_line_separator']$string);
                }
                if (!empty($this->sSettings['fieldmark'])) {
                    $string = str_replace($this->sSettings['fieldmark']$this->sSettings['escaped_fieldmark']$string);
                } else {
                    $string = str_replace($this->sSettings['separator']$this->sSettings['escaped_separator']$string);
                }

                if ($char_set !== 'UTF-8') {
                    $string = utf8_decode($string);
                }
                $string = html_entity_decode($string, ENT_NOQUOTES, $char_set);

                return $this->sSettings['fieldmark'] . $string . $this->sSettings['fieldmark'];

            case 'xml':
                if ($char_set !== 'UTF-8') {
                    $string = utf8_decode($string);
                }

                return $string;

            
Home | Imprint | This part of the site doesn't use cookies.