Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Warpin CODEPAGE woes

1 view
Skip to first unread message

Keith

unread,
Nov 3, 2009, 12:44:04 PM11/3/09
to
Idealy I would like to provide text in a Warpin Installation that is
independant of the systems codepage. To this end I use Unicode by using
CODEPAGE=1208. Unfortuneatly it would appear that the CODEPAGE statement is
not appliicable to REXX scripts within Warpin.

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


A.D. Fundum

unread,
Nov 5, 2009, 2:39:05 PM11/5/09
to
> Unfortuneatly it would appear that the CODEPAGE statement is not
> not appliicable to REXX scripts within Warpin.

> 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.

Alex Taylor

unread,
Nov 6, 2009, 8:27:01 AM11/6/09
to

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.

A.D. Fundum

unread,
Nov 6, 2009, 6:24:26 PM11/6/09
to
>>> Unfortuneatly it would appear that the CODEPAGE statement is not
>>> not appliicable to REXX scripts within Warpin.

>>> 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

unread,
Nov 8, 2009, 2:15:26 PM11/8/09
to
Thanks for the Idea of DosSet*Cp()-Sys\SetProcessCodepage. In order to use
codepage 1208 it needs to be in CONFIG.SYS with CODEPAGE=1208
This unfortunately is not allowed and gives an error during boot.

Keith
"A.D. Fundum" <what...@neverm.ind> wrote in message
news:Zny8KBh2...@neverm.ind...

A.D. Fundum

unread,
Nov 9, 2009, 12:46:32 PM11/9/09
to
>> Unfortuneatly it would appear that the CODEPAGE statement is not
>> not appliicable to REXX scripts within Warpin.

>> 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)...

0 new messages