code-server icon indicating copy to clipboard operation
code-server copied to clipboard

Unable to open '<filename>': Unknown encoding: iso88591.

Open Muruloki opened this issue 7 years ago • 5 comments

  • code-server version: code-server-1.32.0-310-linux-x64
  • OS Version: Ubuntu 16.04.6 LTS

Description

Changing encoding for a single file using UI to iso88591 (by clicking on encoding in right bottom corner and choosing "reopen with....") works fine. However when i try to set default encoding for all files in settings

Files: Encoding The default character set encoding to use when reading and writing files. This setting can also be configured per language.

then i get this error message when i try to switch back to any opened file:

Unable to open '<filename>': Unknown encoding: iso88591.

The only way to fix this is to set it back to utf-8.

Muruloki avatar Mar 26 '19 14:03 Muruloki

@Muruloki How did you get it to save with that encoding? As soon as I changed my file to that format it failed to save and threw this error Failed to handle server message. Did you see that at all?

nol166 avatar Mar 26 '19 15:03 nol166

I also tried locally in native VSCode and it seemed to revert the encoding to UTF8

nol166 avatar Mar 26 '19 16:03 nol166

@nol166

You are right, i wasn't looking at console output. So even using UI the moment i switch to iso88591 i get this in console: image

And after trying to save i get this: image

So it just fails but if you don't pay attention to console it fails silently. However if you try to change encoding for all files via settings you will see vscode error message in the bottom right corner:

image

Muruloki avatar Mar 26 '19 18:03 Muruloki

@Muruloki Yeah that is definitely a bug. We will get this fixed.

nol166 avatar Mar 26 '19 18:03 nol166

I tested this out in v2 and it appears to work. :confetti_ball:

code-asher avatar Sep 18 '19 20:09 code-asher