首页 > 其他 > 详细

nextcloud 中文乱码解决方案

时间:2020-05-06 18:48:44      阅读:303      评论:0      收藏:0      [点我收藏+]

参考地址 :https://www.yht7.com/news/13909

我是使用的第二种方法,

修改/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);

 

技术分享图片

 

nextcloud 中文乱码解决方案

原文:https://www.cnblogs.com/yc-c/p/12837995.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!