php to excel - german Umlaute

前端 未结 2 467
暗喜
暗喜 2021-01-23 02:24

How can I alter this class to support German Umlaute (äöüÄÖÜ)? I tried to use utf8_encode($array) without succes. Also tried to change Content-Transfer-Encoding: binary to utf8<

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-23 02:50

    foreach($v as $k1 => $v1 )
    {
        $file .= $this->xlsWriteLabel( $tr1, $nn1, mb_convert_encoding($v1, 'UTF-16LE', 'UTF-8') );
        $nn1++;
    }
    

    You can also convert it this way.

提交回复
热议问题