zowe / zlux

The top-level superproject for zLUX. zLUX includes the Zowe Desktop framework in addition to several built-in apps and an example server implementation.
Eclipse Public License 2.0
38 stars 42 forks source link

Yaml file is open in UTF-8 no matter how tag is set #950

Closed Martin-Zeithaml closed 1 year ago

Martin-Zeithaml commented 1 year ago

Describe the bug

  1. Open yaml file in zowe editor.
  2. UTF-8 garbage is displayed.

Expected behavior Readable text is displayed.

Additional context Files in runtime, no change done to example-zowe.yaml, example-zowe.txt is a copy of yaml file:

/zowe/runtime/v2.4.0: ls -T
- untagged    T=off DEVELOPERS.md
- untagged    T=off README.md
                    bin
                    components
- untagged    T=off example-zowe.txt      (just a copy with different extension)
- untagged    T=off example-zowe.yaml
                    files
                    fingerprint
                    licenses
- untagged    T=off manifest.json
                    schemas

Example-zowe.txt is opened as expected: image

Example-zowe.yaml is opened in UTF-8: image

Tag to ISO or UTF-8 does not help. No problems with other file types.

Do I have some setting wrong? Any idea?

1000TurquoisePogs commented 1 year ago

The file appears to be EBCDIC since it is readable when untagged. So, tagging it as EBCDIC is the correct tag. Tagging it as ISO would be opposite, and tagging as UTF8 never works (IBM advises against it in the BPKX AUTOCVT documentation)

ZSS assumes encoding when untagged according to file extension. So, it's not certain to succeed, it is just opinionated.

Martin-Zeithaml commented 1 year ago

Yes, EBCDIC works. It is just little bit confusing.