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

Respect the USS encoding of files in the editor #887

Closed
Joe-Winchester opened this issue Jun 17, 2020 · 5 comments
Closed

Respect the USS encoding of files in the editor #887

Joe-Winchester opened this issue Jun 17, 2020 · 5 comments
Labels
enhancement New feature or request priority-medium Not functioning - next quarter if capacity permits

Comments

@Joe-Winchester
Copy link
Member

Is your feature request related to a problem? Please describe.
On USS files can be encoded, e.g.

image

ISO8559-1 files are becoming more frequent on USS, especially .json files for Node, as well as Zowe itself that uses this encoding for its application.yml files by the API Mediation Layer.

The problem is the Zowe Explorer always tries to convert the files from EBCDIC, so encoded files open as garbled characters, and also when data is saved it is garbled on save.

The Zowe Explorer allows for manual toggling between file types, however if it could respect the USS encoding this would make it more usable.

This has been reported to me by a number of users as a block for Zowe Explorer adoption, as other z/OS editors and workbenches do respect USS encoding tags.

Describe the solution you'd like

Before the file is retrieved look at the tagging, see CLI issue zowe/zowe-cli#740 that describes the z/OSMF API that can be used to retrieve the tagging.

When the file is opened display it in the text codepage and when the file is saved store it using the X-IBM-Data-Type so that data is not garbled on save

Additional context

The associated Git CLI issue zowe/zowe-cli#740 covers some of the REST API commands to retrieve the tagging as well as stop the converstion on the data get and put.

@Joe-Winchester Joe-Winchester added the enhancement New feature or request label Jun 17, 2020
@zdmullen zdmullen added this to the Backlog milestone Jun 19, 2020
@1000TurquoisePogs
Copy link
Member

One thing you must be careful of is when things are tagged wrongly. Sometimes this happens due to human error, other times it happens because configuration of some software is wrong, leading to automatic incorrect tagging.
So, I'd say you should respect tags but allow overrides, in case the tag is just wrong.
Also, when it comes to tagging, node that while many code pages are numbered the same as they are named (1047 = ibm-1047), iso8859-1 is number 819 I believe, so accepting either a string or a number is good for UX.

@zdmullen zdmullen modified the milestones: Backlog, Developer Aug 6, 2020
@JillieBeanSim JillieBeanSim removed this from the Developer milestone Oct 6, 2022
@JillieBeanSim JillieBeanSim added the priority-medium Not functioning - next quarter if capacity permits label Jan 25, 2023
@t1m0thyj
Copy link
Member

Currently we implement isFileTagBinOrAscii on the ZoweExplorerApi:
https://github.com/zowe/vscode-extension-for-zowe/blob/963e6c79f2ed632c8b998a72acecf2696ed4ae7b/packages/zowe-explorer-api/src/profiles/ZoweExplorerApi.ts#L103-L109

We should consider deprecating this method and replacing it with applyTaggedEncoding. This method was added in Zowe CLI v7.6.0 and supports other encodings besides binary and ASCII.
https://github.com/zowe/zowe-cli/blob/master/packages/zosfiles/src/methods/utilities/Utilities.ts#L119-L126

@adam-wolfe adam-wolfe added enhancement New feature or request and removed enhancement New feature or request labels Oct 27, 2023
@github-actions
Copy link

Thank you for raising this enhancement request.
The community has 90 days to vote on it.
If the enhancement receives at least 10 upvotes, it is added to our development backlog.
If it receives fewer votes, the issue is closed.

@AnthonyGiorgio
Copy link

This is a problem for me when I want to edit my Python files on z/OS. They are in ASCII format, and VS Code makes a mess of them.

@t1m0thyj
Copy link
Member

t1m0thyj commented Dec 19, 2023

Closing as duplicate of #2576

@t1m0thyj t1m0thyj closed this as not planned Won't fix, can't repro, duplicate, stale Dec 19, 2023
@t1m0thyj t1m0thyj moved this from New Issues to Closed in Zowe Explorer for VS Code Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-medium Not functioning - next quarter if capacity permits
Projects
None yet
Development

No branches or pull requests

7 participants