Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shift-jis(shift_jis, cp932, sjis-win) text file garbled when view web browser direct. #1633

Closed
falconws opened this issue Jun 9, 2020 · 3 comments
Labels
1. to develop bug Something isn't working invalid

Comments

@falconws
Copy link

falconws commented Jun 9, 2020

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Make text file including Japanese character encoded by shift-jis.(attach sample file this issue(text.txt).)
  2. Upload this text file to Nextcloud using the browser (drag and drop).
  3. Click the uploaded text file.

test.txt

Expected behavior

Text file content shows correctly.

Actual behavior

Garbled(broken) content was shown as text file content.

Server configuration

Operating system: Ubuntu Server 20.04 LTS

Web server:
Database:
PHP version:
Where did you install Nextcloud from:

I'm using Nextcloud official docker below.
https://github.com/nextcloud/docker/tree/master/.examples/docker-compose/with-nginx-proxy/mariadb-cron-redis/fpm

Nextcloud version: (see Nextcloud admin page)

Nextcloud 18.0.4

Updated from an older Nextcloud/ownCloud or fresh install:

Fresh install(built from docker).

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - accessibility: 1.4.0
  - activity: 2.11.0
  - bruteforcesettings: 1.6.0
  - calendar: 2.0.3
  - cloud_federation_api: 1.1.0
  - comments: 1.8.0
  - dav: 1.14.0
  - documentserver_community: 0.1.5
  - federatedfilesharing: 1.8.0
  - federation: 1.8.0
  - files: 1.13.1
  - files_external: 1.9.0
  - files_pdfviewer: 1.7.0
  - files_rightclick: 0.15.2
  - files_sharing: 1.10.1
  - files_trashbin: 1.8.0
  - files_versions: 1.11.0
  - files_videoplayer: 1.7.0
  - firstrunwizard: 2.7.0
  - logreader: 2.3.0
  - lookup_server_connector: 1.6.0
  - nextcloud_announcements: 1.7.0
  - notifications: 2.6.0
  - oauth2: 1.6.0
  - password_policy: 1.8.0
  - photos: 1.0.0
  - privacy: 1.2.0
  - provisioning_api: 1.8.0
  - recommendations: 0.6.0
  - serverinfo: 1.8.0
  - settings: 1.0.0
  - sharebymail: 1.8.0
  - support: 1.1.0
  - survey_client: 1.6.0
  - systemtags: 1.8.0
  - text: 2.0.0
  - theming: 1.9.0
  - twofactor_backupcodes: 1.7.0
  - updatenotification: 1.8.0
  - viewer: 1.2.0
  - workflowengine: 2.0.0
Disabled:
  - admin_audit
  - encryption
  - user_ldap

Nextcloud configuration:

Config report
{
    "system": {
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "example.org"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "18.0.4.2",
        "overwrite.cli.url": "https:\/\/example.org",
        "overwriteprotocol": "https",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "default_language": "ja",
        "default_locale": "ja_JP"
    }
}

Are you using external storage, if yes which one: local/smb/sftp/...

yes. using local only.

Are you using encryption: yes/no

no.

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

no.

Client configuration

Browser: Google Chrome Stable

Operating system: Windows 10 and macOS

Logs

Web server error log

Web server error log
error.log is empty. my env is docker so error.log is

# ls -la /var/log/nginx/error.log 
lrwxrwxrwx    1 root     root            11 Apr 24 12:58 /var/log/nginx/error.log -> /dev/stderr

# docker-compose logs show me access.log(not error.log).

Nextcloud log (data/nextcloud.log)

Nextcloud log
I try
# tail -f nextcloud.log
and doing the step to reproduce(3).
But output log is empty.

Browser log

Browser log
a) The javascript console log
Opening the viewer with a single string parameter is deprecated. Please use a 
destructuring object instead OCA.Viewer.open({ path: '/test.txt' })  Viewer.js:97

Opening viewer for file  /test.txt  Viewer.vue:219
moment is deprecated: please ship your own, this will be removed in Nextcloud 20  global.js:66
@szaimen szaimen transferred this issue from nextcloud/server Jun 2, 2021
@juliusknorr juliusknorr added 1. to develop bug Something isn't working labels Mar 4, 2022
@juliusknorr
Copy link
Member

Probably related to #824

@luka-nextcloud
Copy link
Contributor

luka-nextcloud commented Nov 4, 2022

I think this is not an issue, files show correctly but if it's a .txt file there is no actions bar shown.

@juliusknorr
Copy link
Member

Was fixed with #2385

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop bug Something isn't working invalid
Projects
None yet
Development

No branches or pull requests

4 participants