-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
We're hitting an error when executing an UTF-8 tagged file via shebang. It works fine with ISO8859-1 tagged files.
It looks that zopen bash isn't behaving like /bin/sh, it needs to inherit the _BPXK_AUTOCVT variable setting.
ZOS version: z/OS 3.2 (One thing to note that it works correctly using zopen-bash on zos2.4)
How to reproduce:
ZOS 3.2
IBMUSER:/u/ibmuser #>cat test_cat.sh
#!/bin/cat
Hello world
# tagged ISO8859-1
IBMUSER:/u/ibmuser #>ls -T test_cat.sh
t ISO8859-1 T=on test_cat.sh
IBMUSER:/u/ibmuser #>./test_cat.sh
#!/bin/cat
Hello world
bash-4.3$ env -i /opt/zopen/usr/local/bin/bash --norc
bash-5.2$ export _BPXK_AUTOCVT=ALL
bash-5.2$ ./test_cat.sh
./test_cat.sh: line 2: Hello: command not found
# if inherited
bash-5.2$ env -i _BPXK_AUTOCVT=ALL /opt/zopen/usr/local/bin/bash --norc
bash-5.2$ ./test_cat.sh
#!/bin/cat
Hello world
ZOS2.4
> env -i bash --norc
> export _BPXK_AUTOCVT=ALL
>./utf.sh
#!/bin/cat
Hello world
> env -i _BPXK_AUTOCVT=ALL bash --norc
> ./utf.sh
#!/bin/cat
Hello world
Metadata
Metadata
Assignees
Labels
No labels