Surely worth trying, as it looks that potentially these functions do exactly 
what I need to do.
So the only question is where to find "FROM CCSID" and "TO CCSID".
What do you think, is it a correct assumption, that "TO CCSID" is a current 
job's CCSID, that I can obtain, if I temporarily add 


to my program....

But still even if this is correct, it will leave me with approximately 65,000 
OK, I can program it, AS/400 is black and made of metal, it is dedicated to 
work, but if my assumption is wrong, then it will make 65000*65000 
possibilities, which is probably beyond its capabilities :-(

> -----Original Message-----
> From: Elvis Budimlic [mailto:ebudimlic@xxxxxxxxxxxxxxxxxxxxxxxxx]
> Sent: Wednesday, September 21, 2005 12:00 PM
> To: 'C programming iSeries / AS400'
> Subject: RE: [C400-L] Local characters encoding problem
> Perhaps with iconv API you could always force the input to the same
> "regional setting" and thus only maintain one version of code?
> onvopn.htm
> onvcls.htm
> Not sure, but it may be worth a try.
> Elvis
> -----Original Message-----
>  Subject: [C400-L] Local characters encoding problem
> Having a very unpleasant problem with scrambled local 
> characters in program
> call input parameters.
> Maybe someone can advise me of how to solve it.
> PC program makes a call to a AS/400 program passing some 
> parameters as a
> unsigned char array, that is actually a packed structure. So 
> it contains
> bytes, some of which are actually chars, some are numbers. PC 
> has always one
> and the same local settings.
> Probably my 3 AS/400 have different "regional settings". 
> Result is that
> depending on the particular machine I must use 3 different 
> manually built
> encoding tables.
> We have only 8 local characters, so building this table 
> itself is not a
> problem. But the problem is managing 3 different versions of the same
> program, that work on particular machine.
> For exampl I have letter Ä (capital A with 2 dots above it) 
> that comes to
> one machine as 0x0A and to another machine as 0x24.
> So on one machine I must have a code row :
> for (i = 0; i < 20; i++)
>   if (Buffer[i] == 0x0A) ;
>     Buffer[i] = 'Ä' ;
> and on another machine :
> for (i = 0; i < 20; i++)
>   if (Buffer[i] == 0x24) ;
>     Buffer[i] = 'Ä' ;
> Stupid, isn't it?! Is there a chance to find some proper 
> AS/400 parameter,
> may be some system variable or whatever, that can be tested 
> in order to
> select proper comparison right side?
> Should say here, that I understand, that probably correct way 
> is to take
> care of this encoding is to push it to PC side, but this is 
> not an option
> for certain reasons...
> TIA,
> Jevgeni Astanovski
> -- 
> This is the C programming iSeries / AS400 (C400-L) mailing list
> To post a message email: C400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit:
> or email: C400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].