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

Re: Scott - Urgent Help in HTTP_SetCCSIDs()



Hello Unni,

Are you telling me that you can't change your copy of HTTPAPI?  If 
there's a problem in HTTPAPI that prevents CCSID translation from 
working correctly, then I can't fix it without changing HTTPAPI.  Since 
you can't change your copy of HTTPAPI, I can't help you.

Using the HTTP_setCCSIDs() procedure that I told you to use, I'm able to 
send non-english characters without any problems.  Of course, my company 
is running HTTPAPI version 1.18... I don't know if that's the 
difference, or if you're just doing something wrong??

But, I don't know how else I can help you.  It works for me.  If it 
doesn't work for you, tell me how to reproduce the same problem you're 
experiencing.  If I can't reproduce it, I can't fix it.   Though, even 
if I did fix it, you wouldn't be allowed to use my fixes anyway, since 
you can't change your copy of HTTPAPI....


Unnikrishnan Rajasekharan wrote:
>    You have asked me to upgrade to the current version. Also, you have
>    asked me to use
> 
>    callp HTTP_SetCCSIDs(1208:0).
> 
>    1.   I am using the version 1.16 now and majority of the coding
>    related to use of HTTPAPI was done by a colleague who is not available
>    now. I am not sure of what all libraries and programs he has used and
>    changed in putting your sources. This is already in production. As I
>    have only very little time to fix this Non-english character issue, so
>    is it ok if I can use version 1.16
> 
> 
> 
>    2.   Also when i check inside version 1.17 HTTPAPI_H member, I am
>    seeing another procedure HTTP_xml_SetCCSIDs() which is not there in
>    older version. Did you initially wanted me to use
>    HTTP_SetCCSIDs(1208:0) or HTTP_xml_SetCCSIDs(1208:0)
> 
>    
> 
>    If I can you use 1.16 itself, will the conversion work if I add the
>    below code from 1.17 to my current HTTPAPI_H? If not what other way is
>    possible as callp HTTP_SetCCSIDs(1208:0) is still giving me '?'
>    instead of special characters.
> 
>    
> 
>    *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>          * HTTP_xml_SetCCSIDs():  Set the CCSIDs used for ASCII/EBCDIC
>          *                    translation for XML documents
>          *
>          *     peRemote = (input) remote CCSID
>          *     peLocal  = (input) local CCSID (can be 0 if you want
>          *                 to use the CCSID of the current job)
>          *
>          * Returns 0 if successful, -1 otherwise
>          *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>         D HTTP_xml_SetCCSIDs...
>         D                 PR            10I 0
>         D   peRemote                    10I 0 value
>         D   peLocal                     10I 0 value
> 
> 
>    *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 
>    Scott Klement <sk@xxxxxxxxxxxxxxxx> wrote:
> 
>    Hello,
>    > Is it ok, if I code it immediately after my main
>    > program call these 2 CPYSRC as below 2 statements
>    >
>    > 0098.00 *
>    > 0099.00 /copy *LIBL/qcpysrc,config_h
>    > 0100.00 /copy *LIBL/qcpysrc,httpapi_h
>    I don't use a file named QCPYSRC. I keep my source members in a file
>    named QRPGLESRC. Did you change that? If so, I must warn you that
>    making changes to the HTTPAPI source code will make it more difficult
>    for you to upgrade from one release to the next. I recommend that you
>    leave HTTPAPI as-is. When you write your own programs that itnerface
>    with it, put the source code and objects for those programs in
>    separate
>    libraries so that you can delete and reinstall LIBHTTP without losing
>    your source code or objects.
>    Also, you don't have to manually include CONFIG_H, it's brought in
>    automatically by HTTPAPI_H. I don't understand what any of this has to
>    do with your original question about coding international characters?
>    All programs that use HTTPAPI must /COPY the HTTPAPI_H member, since
>    it
>    contains all of the definitions needed to use the tool.
>    I can't tell you whether your call to HTTP_setCCSIDs() belongs after
>    these statements or not, since I don't know what other code you have
>    after these statements! Please remember that I've never seen your
>    program!
>    You can put the call to http_setccsids() anywhere, as long as it runs
>    before your call to HTTP_url_post_xml().
>    > Also, I have these codes below inside HHTPAPI_H. Is it like,
>    > HTTP_SetCCSID will work only for ASCII and EBCDIC as per the below
>    > code? Do I have to change anything in the below code.
>    You appear to be using an outdated version of HTTPAPI. Please upgrade
>    to the current version.
>    > 2. My second doubt is that, whether converting my RPG variable to
>    > UTF_8 will in anyway affect my files, as I am also updating certain
>    > AS/400 logical files inside the main program where I call
>    WEBSERVICES
>    > also.
>    No, it's purely used to control the data that's sent to the web
>    service,
>    it has nothing to do with your files.
> 
>    Scott Klement <sk@xxxxxxxxxxxxxxxx> wrote:
> 
>      At the start of your code, insert a line that looks like this:
>      callp HTTP_set_ccsids(1208: 0)
>      This tells HTTPAPI to convert your EBCDIC document in your RPG
>      variable
>      to UTF-8 (Unicode). UTF-8 shouldn't have any trouble with your
>      characters. Plus, you've told the web service that your document
>      will
>      be encoded with UTF-8 -- so it'd make sense to actually encode it
>      that way!!
>      Unnikrishnan Rajasekharan wrote:
>      > Hi all,
>      >
>      > I am sending some Non-english charcaters like Ñ and ° as
>      > shown below from AS/400 to WEBSERVICES with HHTPAPI
>      >
>      > Address2>CALLE 13 AV CENTENARIO N° 84-65 ATN: FANY PEÑA
>      >
>      > The non-english charcters were replaced as shown below
>      >
>      > Request document:
>      >
>      >
>      xmlns:Vastera="[1]http://ndcXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>      XXX
>      > XXXXXXXXXXXXXX[2]/envelope/"
>      > xmlns:xs="[3]http://www.w3..org/2001/XMLSchema";>
>      > stomerValidation_RequestInfo>1036313774-0004-001>
>      >PTNR_SHIP_TOPTNR_ULT_CONSIGNE
>      > E100ACTIVE> s>KONEKTEL> merName>ADD1 CHGCALLE 13 AV CENTENARIO
>      > N? 84-65 ATN: FANY PE?
>      >
>      >
>      >
>      > How do I send the non-english charcters as it is with HTTPAPI?
>      >
>      > Any ideas on this are most welcome..
>      >
>      >
>      >
>      > Thanks in advance,
>      >
>      > Unni

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------