修改/服务器路径/nextcloud/apps/text/lib/Service/ApiService.php文件
第112行修改为:
$fileContents=$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';
}
if ($encoding !== 'UTF-8') {
$fileContents = iconv($encoding, 'UTF-8', $fileContents);
$file->putContent($fileContents );
}
return new FileDisplayResponse($file);