f



Warpin CODEPAGE woes

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




0
11/3/2009 5:44:04 PM
comp.os.os2.programmer.misc 1326 articles. 0 followers. Post Follow

5 Replies
224 Views

Similar Articles

[PageSpeed] 41

 > 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.
0
what
11/5/2009 7:39:05 PM
On Thu, 5 Nov 2009 19:39:05 UTC, what.ever@neverm.ind (A.D. Fundum) wrote:

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

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.
0
Alex
11/6/2009 1:27:01 PM
 >>> 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.
0
what
11/6/2009 11:24:26 PM
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.ever@neverm.ind> wrote in message 
news:Zny8KBh24xuK090yn@neverm.ind...
> > 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. 


0
Keith
11/8/2009 7:15:26 PM
 >> 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
what
11/9/2009 5:46:32 PM
Reply: