Basically I have a script that uses various REXX functions to determine the
current locale and depending on that locale set text strings in the
appropriate language. The strings are stored using WirexxPutEnv(name
string)
Later the strings are read from the environment using WirexxGetEnv(name) and
used in the <TEXT> statements.
Unicode text that is directly encoded in Warpin instructions such as <TEXT>
and <README> is handled and displayed correctly. Text returned from REXX
statements is only correct as long as it is not a special character (ASCII
characters in the range 0 - 0x7F). It would appear that for correct
translation the CODEPAGE statement has to be the same as the primary
codepage of the system. the string.
Example:
system has primary Codepage 850
<WARPIN VERSION="0.9.9" OS="OS2_4x" CODEPAGE=850>
..
..
..
<REXX NAME=get_>
Return "abc�"
</REXX>
..
..
..
..
<TEXT>=("get_")</TEXT>
the text is displayed correctly as
"abc�"
if the system has the primary Codepage 1004
then the text is displayed as
"abc?"
Has anyone any ideas on how to get around this problem
Keith
> Has anyone any ideas on how to get around this problem
Set the codepage using a Rexx DLL calling the DosSet*Cp()-API? Please
note I'm not sure about the allowed level of Rexx, because e.g. GenMAC
v2.20 fails to unpack with ObjectRexx in use.
SysSetProcessCodepage is available in REXXUTIL.
However, this does require the desired codepage to be configured in
CONFIG.SYS, which if I understand correctly makes it largely useless
for Keith's purposes.
--
Alex Taylor
Fukushima, Japan
http://www.socis.ca/~ataylo00
Please take off hat when replying.
>>> Has anyone any ideas on how to get around this problem
> SysSetProcessCodepage is available in REXXUTIL.
Not mentioned in my CREXX.INF, but indeed available in the matching
CREXUTIL.DLL. It then may limit the number of supported OS versions,
unless WarpIN itself already determines the worst case-limits.
Off-topic: OS/2 is dropped by ooRexx 4. That implies ooRexx 3.2 is the
final one that could be ported. The same project may also start with
some ooNetRexx. Since 'open' seems to be limited to *ix or *ws, ports
of their ooNetRexx to OS/2 then may have to be based on an early v1.
But in both cases fixed bugs will be more important than features. A
count of *NRX*-files returns 3, including an EPMKWDS.NRX. A count of
actually used Rexx objects results in 0.
> However, this does require the desired codepage to be configured in
> CONFIG.SYS
So it'll often require a reboot! And optionally a selective install
of missing OS components. And sometimes a next reboot to restore the
former CODEPAGE-situation, after completing just the *.WPI-install. I
don't know if that's worth it, because the installed package doesn't
use the - then missing again - *.WPI codepage.
Keith
"A.D. Fundum" <what...@neverm.ind> wrote in message
news:Zny8KBh2...@neverm.ind...
>> Has anyone any ideas on how to get around this problem
> Set the codepage using a Rexx DLL calling the DosSet*Cp()-API?
Oops! The OS command CHCP (or HELP CHCP, says it about all)...