Script does not run in Chinese locale

Hi all,

There may be an obvious answer to this that I am just overlooking.

I have a shell script (sh) that I am running on different locales on z/OS. It executes fine on most locales except for Chinese (zh_CN) and Turkish (tr_TR).
For these languages, the script does not even execute.

For Turkish, this is the error: "bad [�� modifier" which translates to "bad [cd modifier"

One thing I noticed is that the unix prompt symbol changes for these locales.

Turkish: [
Chinese: \

Does anyone know what is happening here?

Thanks in advance!

z/OS tranlsates characters into EBCDIC (thanks fpmurphy) from ASCII before running.

I have no idea what you get for those two locales. I do know that some "high" ASCII
(>127) does not have a counterpart in EBCDIC, but I would assume the folks who developed the iconv routines were aware of this. I guess not always.

This is not a solution for you, sorry.

Thanks for the tip jim.

I found out what was causing the problem, related to what you said. I ran into this once before just not to this scale. It turns out that my script is in IBM-1047. When running this script in Chinese (whose codepage is IBM-935) there are problems with variant characters. In Chinese, all characters such as $, {, [, | are coded differently than in IBM-1047. I saw this in other languages when dealing with the piping character |. I just didnt expect to see this with so many other characters with the Chinese locale. Even variables do not start with $ they start with \ . In order to fix this I converted to the Chinese EBCDIC codepage and the script now runs.