nextcloud 中文乱码解决方案
生活随笔
收集整理的這篇文章主要介紹了
nextcloud 中文乱码解决方案
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
修改/nextcloud/lib/public/AppFramework/Http/FileDisplayResponse.php文件
第68行注銷掉
修改為
//$output->setOutput($this->file->getContent());
$fileContents=$this->file->getContent();
$encoding = mb_detect_encoding($fileContents . "a", "UTF-8,GB2312, GBK, WINDOWS-1252, ISO-8859-15, ISO-8859-1, ASCII", true);
if ($encoding === "") {
$encoding = "ISO-8859-15";
}
$fileContents = iconv($encoding, "UTF-8", $fileContents);
$output->setOutput($fileContents);
總結(jié)
以上是生活随笔為你收集整理的nextcloud 中文乱码解决方案的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 从虚拟化到云原生——容器技术的发展史
- 下一篇: 数字证书原理分析总结