[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ftpapi] CCSID Problems with Example Sources



Christian,

 

I assume that your jobs run with CCSID 273 and that you used a 5250 session with CCSID = 273 or RDi to change EXAMPLE15. Is that correct?

 

At least this is how I could reproduce the problem. Here is, what happened:

 

a)    You opened a source member with CCSID 37 from a 5250 session with CCSID 273.

b)    You entered the ‘@’ character on a German keyboard.

c)    Since your job runs with CCSID 273, no character translation takes place from the session to the job.

d)    Since the source member is CCSID 37, the ‘@’ is converted to CCSID 37.

 

So far so good (or actually bad). When you look at the source member with DSPPFM and hex mode, you see, that the hex code of your ‘@’ equals the hex code of the ‘@’ of Scott’s email address. Now the bad thing happens:

 

e)    WEBFORM_SetVar() converts the content of ‘fromAddr’ to ASCII but it uses the CCSID of the current job and not the CCSID of the source member. Since x’C7’ equals the German ‘§’, you get back the ASCII ‘§’.

 

There are two options to fix the problem:

 

1)    Use a UCS-2 literal for the AT character.

2)    Copy the source members of HTTPAPI to a source file with CCSID 273.

 

Another (really bad) option is to run your jobs with CCSID *HEX. This way no character translation takes place between the 5250 session (or RDi) and the source member. When you look at the source member, you see the “wrong” ‘§’ character. But since the hex code equals the ‘@’ that you entered, the character is correctly converted to ASCII (WEBFORM_SetVar: job CCSID to ASCII).

 

Regards,

 

Thomas.

 

 

Von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Im Auftrag von die_scholl@xxxxxxxxx
Gesendet: Donnerstag, 16. März 2017 15:23
An: FTPAPI/HTTPAPI Mailing List
Betreff: [Ftpapi] CCSID Problems with Example Sources

 

Hi all,

 

first of all, this is my first posting to a mailing list ever, so I apologize for maybe doing something wrong.

 

I just installed HTTPAPI 1.34 and tried to run EXAMPLE15.

The program fails and states that my email address is invalid ("Invalid E-mail Address" in testpost.html).

 

In the debugger (RDi) I can see that @ is turning to § and ! becomes Ü as soon as I populate a variable with a value. The program source member looks good in LPEX/RDi while in SEU the wrong characters appear.

 

Our i5’s primary language is German. The job is running with CCSID 273 while the source file, LIBHTTP/QRPGLESRC, is CCSID 37. I assume that could be the problem here.

 

Can I convert the source files to 273 without doing any harm?

If so, how can I do it? And ... would it really improve the matter?

 

Thanks in advance

Markus

 

--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone else is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender.
-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi