Skip to content
This repository has been archived by the owner on Jun 30, 2020. It is now read-only.

WebDAV model Chinese text content gibberish #17

Closed
seekwe opened this issue Jun 14, 2018 · 6 comments
Closed

WebDAV model Chinese text content gibberish #17

seekwe opened this issue Jun 14, 2018 · 6 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@seekwe
Copy link

seekwe commented Jun 14, 2018

Chinese text content gibberish, file name is no problem.
Other patterns SFTP, no problem.

@mkloubert
Copy link
Owner

@seekwe

Since version 0.27.0 there is a new parameter, called encoding. which defines the read/write encoding for text files:

{
    "folders": [{
        "uri": "webdav://webdav.example.com/?encoding=utf8",
        "name": "My WebDAV folder"
    }],
    "settings": {}
}

Its default value is binary, but you can play with it by using values like utf8.

Have a look at Node.js Buffer class documenation for more information.

@mkloubert mkloubert added bug Something isn't working good first issue Good for newcomers labels Jun 14, 2018
@seekwe
Copy link
Author

seekwe commented Jun 15, 2018

Ok, thank you

@seekwe seekwe closed this as completed Jun 15, 2018
@seekwe seekwe reopened this Jun 15, 2018
@seekwe
Copy link
Author

seekwe commented Jun 15, 2018

vscode-remote-workspace create the file no problem,
But closed vscode open again or open the vscode-remote-workspace created file is garbled

@mkloubert
Copy link
Owner

@seekwe

Have you tried an encoding like utf8? Maybe the problem is, that used module isBinaryFile does detect chinese text files as binary content.

@seekwe
Copy link
Author

seekwe commented Jun 16, 2018

Use encoding=utf8, so the file created by vscode is normal, but the MD file or TXT file created in other places will not work. For the time being, you can only view the file created by vscode.

It is strange that sftp and the like have no such problem.

If you don't have a better solution for the time being, let's do it this way.

Thank you for providing such a convenient plugin.

@seekwe
Copy link
Author

seekwe commented Jul 3, 2018

encoding=utf8&binEncoding=utf8

perfect.

Thank you very much!

@seekwe seekwe closed this as completed Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants