Nextcloud show chinese font will show wrong code in text file

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 24.0.6
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.41
PHP version (eg, 7.4): 7.4

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N):Y

Steps to replicate it:

  1. Upload text file to nextcloud
  2. Use nextcloud to open text file.
  3. If text content is chinese.It’s will show wrong code.

The output of your Nextcloud log in Admin > Logging:

Error	core	Tried to log in akong but could not verify token	
2022-10-12T09:57:16+0800
Error	PHP	Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0	
2022-10-12T09:55:00+0800
Error	PHP	Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'ocg754201f9q',
  'passwordsalt' => '********',
  'secret' => '********',
  'trusted_domains' =>
  array (
    0 => '********',
  ),
  'datadirectory' => '/home/users/akong/www/*******/cloud/data',
  'dbtype' => 'mysql',
  'version' => '24.0.6.1',
  'overwrite.cli.url' => '*******',
  'dbname' => '*****',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '*****',
  'dbpassword' => '*******',
  'installed' => true,
  'defaultapp' => 'apporder',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'akong',
  'mail_domain' => '***',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '****',
  'mail_smtpport' => '587',
  'mail_smtpname' => '***@***',
  'mail_smtppassword' => '******',
  'enable_previews' => true,
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\Image',
    1 => 'OC\\Preview\\Movie',
    2 => 'OC\\Preview\\TXT',
  ),
  'default_phone_region' => 'TW',
  'memcache.locking' => '\OC\Memcache\Redis',
  'redis' => [
     'host' => '/var/run/redis/redis-server.sock',
     'port' => 0,
  ],
  'memcache.local' => '\OC\Memcache\APCu',
  'memcache.distributed' => '\OC\Memcache\Memcached',
  'memcached_servers' =>
  array (
    0 =>
    array (
      0 => 'localhost',
      1 => 11211,
    ),
  ),
);

The output of your Apache/nginx/system log in /var/log/____:

220.130.148.52 - - [12/Oct/2022:10:08:24 +0800] "POST /index.php/apps/text/session/sync HTTP/2.0" 200 247 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0" 296 933
220.130.148.52 - - [12/Oct/2022:10:08:26 +0800] "POST /index.php/apps/text/session/sync HTTP/2.0" 200 247 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0" 292 933
220.130.148.52 - - [12/Oct/2022:10:08:27 +0800] "POST /index.php/apps/text/session/sync HTTP/2.0" 200 247 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0" 292 933
220.130.148.52 - - [12/Oct/2022:10:08:28 +0800] "POST /index.php/apps/text/session/sync HTTP/2.0" 200 247 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0" 292 933
220.130.148.52 - - [12/Oct/2022:10:08:30 +0800] "PROPFIND /remote.php/dav/files/akong/ HTTP/1.1" 207 236 "-" "Mozilla/5.0 (Windows) mirall/3.4.1stable-Win64 (build 20211221) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)" 1606 6416
220.130.148.52 - - [12/Oct/2022:10:08:31 +0800] "POST /index.php/apps/text/session/sync HTTP/2.0" 200 247 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0" 292 933
220.130.148.52 - - [12/Oct/2022:10:08:32 +0800] "POST /index.php/apps/text/session/sync HTTP/2.0" 200 247 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0" 714 933
220.130.148.52 - - [12/Oct/2022:10:08:34 +0800] "POST /index.php/apps/text/session/close HTTP/2.0" 200 22 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0" 218 707
220.130.148.52 - - [12/Oct/2022:10:08:36 +0800] "GET /index.php/core/preview?fileId=8245&c=efe4765d262933fb195bc0449a38aaaf&x=250&y=250&forceIcon=0&a=0 HTTP/2.0" 404 2 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0" 163 666
220.130.148.52 - - [12/Oct/2022:10:08:37 +0800] "GET /index.php/core/preview?fileId=8402&c=c4cee8d83f12bd8fbfa2f881f2defd13&x=250&y=250&forceIcon=0&a=0 HTTP/2.0" 404 2 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0" 248 666
220.130.148.52 - - [12/Oct/2022:10:08:39 +0800] "PROPFIND /remote.php/dav/files/akong/%E4%B8%8A%E6%B5%B7IP%E5%88%97%E8%A1%A8.txt HTTP/2.0" 207 572 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0" 806 1275
220.130.148.52 - - [12/Oct/2022:10:08:40 +0800] "PUT /index.php/apps/text/session/create HTTP/2.0" 200 459 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0" 215 1145
220.130.148.52 - - [12/Oct/2022:10:08:40 +0800] "POST /index.php/apps/text/session/sync HTTP/2.0" 200 247 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0" 292 933
220.130.148.52 - - [12/Oct/2022:10:08:45 +0800] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0" 304 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0" 121 167
220.130.148.52 - - [12/Oct/2022:10:08:47 +0800] "POST /index.php/apps/text/session/sync HTTP/2.0" 200 247 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0" 1564 933
192.168.50.5 - - [12/Oct/2022:10:08:46 +0800] "GET / HTTP/2.0" 200 17834 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0" 107 18400
219.85.234.20 - - [12/Oct/2022:10:08:51 +0800] "PROPFIND /remote.php/dav/files/akong/ HTTP/1.1" 207 236 "-" "Mozilla/5.0 (Windows) mirall/3.4.1stable-Win64 (build 20211221) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)" 1610 6416
220.130.148.52 - - [12/Oct/2022:10:08:52 +0800] "POST /index.php/apps/text/session/sync HTTP/2.0" 200 247 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0" 292 933

PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

{"reqId":"dpW9puOkTwPT1NePsb7k","level":3,"time":"2022-10-12T02:37:00+00:00","remoteAddr":"220.130.148.52","user":"akong","app":"PHP","method":"POST","url":"/index.php/apps/text/session/sync","message":"Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0","version":"24.0.6.1","data":{"app":"PHP"}}
{"reqId":"2Y6msef1P9O6spfLLrT6","level":3,"time":"2022-10-12T02:37:00+00:00","remoteAddr":"220.130.148.52","user":"akong","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/akong/","message":"Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.1stable-Win64 (build 20211221) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"24.0.6.1","data":{"app":"PHP"}}
{"reqId":"ZIGrhBXSqUZqrpJuL3nK","level":3,"time":"2022-10-12T02:38:09+00:00","remoteAddr":"220.130.148.52","user":"akong","app":"PHP","method":"POST","url":"/index.php/apps/text/session/sync","message":"Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0","version":"24.0.6.1","data":{"app":"PHP"}}
{"reqId":"4azBbb1NCg8GCVOwKAwf","level":3,"time":"2022-10-12T02:39:14+00:00","remoteAddr":"220.130.148.52","user":"akong","app":"PHP","method":"POST","url":"/index.php/apps/text/session/close","message":"Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0","version":"24.0.6.1","data":{"app":"PHP"}