> On 11 Jul 2023, at 10:41 am, kekronbekron > <[email protected]> wrote: > > Hi David, > > A quick question - > Will the same chtag command work for, say, Java packages/projects?
Yes > Or, would I have to use chtag -R -tc UTF-8 if a project expects to things to > be in UTF8? I'd like to understand your reasons for wanting to encode your Java source files in UTF-8. It's important to note that the default encoding on z/OS is IBM-1047 (EBCDIC). We typically use ISO8859-1 and have to specify the "-encoding iso8859-1" option when using the javac compiler. As mentioned earlier, tagging files as UTF-8 can lead to unexpected issues, which is why it's not commonly done. If you examine the file attributes of modern languages like Python, Node.js, Go, etc., you'll notice that their source files are tagged as ISO8859-1. A while ago, one of our ported tools developers provided me with a detailed explanation regarding the challenges associated with UTF-8 for ported tools. Although I don't recall all the specifics, it had something to do with double conversions. Therefore, the general rule of thumb is to avoid using UTF-8 unless it is necessary, such as when embedding a YAML document into a Java JAR file. > > > - KB > > ------- Original Message ------- > On Tuesday, July 11th, 2023 at 3:34 AM, David Crayford <[email protected]> > wrote: > > >> It’s difficult to use modern tools when the systems you work on are air >> gapped. >> >> I can’t recreate your problem but I used a different method. I downloaded a >> zip file from Github, uploaded it to z/OS and followed these steps: >> >> jar xf psutill-master.zip >> cd psutil-master >> chtag -R -tc iso8859-1 . >> python3 setup.py >> >>> platform zos is not supported >> >> >> Like I said, it’s a heavy lift to port this package to z/OS. >> >>> On 9 Jul 2023, at 11:08 pm, Frank Allan Rasmussen [email protected] wrote: >>> >>> Hi >>> >>> I'm doing this on the company sandbox so I can not make a git clone. >>> >>> And trying 8859-1 (cp 819) does not change anything: >>> >>> /home/bc6608/psutil:chtag -p setup.py >>> t ISO8859-1 T=on setup.py >>> >>> PYTHONWARNINGS=all python3 setup.py build_ext -i `python3 -c "import sys, >>> os; py36 = sys.version_info[:2] >= (3, 6); cpus = os.cpu_count() or 1 if >>> py36 else 1; print('--parallel %s' % cpus if cpus > 1 else '')"` >>> Traceback (most recent call last): >>> File "/home/bc6608/psutil/setup.py", line 47, in <module> >>> from _common import AIX # NOQA >>> ^^^^^^^^^^^^^^^^^^^^^^^ >>> UnicodeDecodeError: 'utf-8' codec can't decode byte 0x97 in position 2: >>> invalid start byte >>> >>> I'm know that getting to run and move it back to github will be >>> clumbersome, but if I do not try I do not learn. >>> >>> BR >>> Frank Allan Rasmussen >>> >>> ---------------------------------------------------------------------- >>> For IBM-MAIN subscribe / signoff / archive access instructions, >>> send email to [email protected] with the message: INFO IBM-MAIN >> >> >> ---------------------------------------------------------------------- >> For IBM-MAIN subscribe / signoff / archive access instructions, >> send email to [email protected] with the message: INFO IBM-MAIN > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
