2

does anyone know of a way to add a new encoding to VS Code? Either by way of adding a new encoding file or setting up an extension to do on the fly conversion? Specifically I'm trying to add support for decoding IBM EBCDIC (1047) to VS Code. Any help would be appreciated!

I haven't been able to find any clues as to how one might go about doing this.

mswatosh
  • 466
  • 2
  • 8
  • 1
    vscode may enumerate the codepages installed on the operating system for it's built-in encoding support, so the question would boil down to how to install this codepage on your OS (which you haven't mentioned). It's possible converting your data to something reasonably universal like UTF-8 using an external tool like iconv is the simplest way to proceed. – Paul Dempsey May 02 '23 at 18:23
  • What exactly do you mean by *add a new encoding to VS Code*? – JosefZ May 02 '23 at 18:34
  • It's a pity, we have Unicode since more than 20 years and people **know** how problematic plain text files with an arbitrary encoding are, and still they are used (not the people, but the old code pages). Why can't the world finally switch to Unicode for every text? My tip Josh: convert the files first to Unicode and keep them as such. Then use editors like VS Code to work on them. – Mike Lischke May 03 '23 at 06:45
  • @MikeLischke These files are source COBOL files that are compiled/linked/executed on an IBM mainframe, hence the need for them to be encoded in IBM 1047. I would like to able to use FTP to open them directly off of the mainframe. – Josh Pugsley May 03 '23 at 19:51
  • @PaulDempsey the operating system I am using is Mac OS 13. Yeah I've thought that creating some compatibility layer where the files were converted into UTF would be a way around my issue but I was trying to avoid adding the complexity of doing this. – Josh Pugsley May 03 '23 at 19:51
  • Adding a new encoding is much more complex, because it would require to change the VS Code source code. It might be much easier for you to write a small in/out converter which converts between UTF-8 and IBM EBDIC on macOS, right after to pulled from your SCMS or before you push to it. – Mike Lischke May 04 '23 at 06:53

0 Answers0