[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
One more doubt in Non english character like Ñ being send as '?' to Webservice
This is the code I have inside CONFIG_H which is the COPYSRC.
----------------------------------------------------------------------
-----------------------------
0059.00 /undefine HTTP_USE_TABLES
0060.00 /if defined(HTTP_USE_TABLES)
0061.00 D HTTP_TOEBC C CONST('QTCPEBC')
0062.00 D HTTP_TOASC C CONST('QTCPASC')
0063.00 /else
0064.00 D HTTP_EBCDIC C CONST(0)
0065.00 D HTTP_ASCII C CONST(819)
0066.00 /endif
0068.00 *** This is the codepage or CCSID assigned to downloaded
stream
0069.00 *** files by default. (Note: HTTPAPI does not convert the
file
0070.00 *** to this CCSID, it just assigns this number to the file's
0071.00 *** attributes.)
0072.00 ***
0073.00 *** Whether this is treated as a CCSID or a codepage depends
on
0074.00 *** the value of the HTTP USE CCSID condition, below.
0075.00 ***
0076.00 *** Can be overridden at runtime by calling
HTTP_SetFileCCSID()
0077.00
0078.00 D HTTP_CCSID C CONST(1252)
----------------------------------------------------------------------
-------------------------
Its setting some values for CCSID and for conversion.
I have 2 questions now.
1. The position of insertion of the 'code line' as you(Scott)
mentioned below. 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
0101.00 *
0102.00 D Incoming PR
0103.00 D msg 500A
0104.00 D depth 10I 0 value
0105.00 D name 1024A varying const
0106.00 D path 24576A varying const
0107.00 D value 32767A varying const
0108.00 D attrs * dim(32767)
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.
0947.00 * HTTP_SetCCSIDs(): Set the CCSIDs used for ASCII/EBCDIC
0948.00 * translation
0949.00 *
0950.00 * peASCII = (input) ASCII CCSID
0951.00 * peEBCDIC = (input) EBCDIC CCSID (can be 0 if you want
0952.00 * to use the CCSID of the current job)
0953.00 *
0954.00 * Returns 0 if successful, -1 otherwise
0955.00
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
0956.00 D HTTP_SetCCSIDs PR 10I 0
0957.00 D peASCII 10I 0 value
0958.00 D peEBCDIC 10I 0 value
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.
Thanks,
Unni
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
>
> Do not follow Where the Path May LEAD,
> Go instead where there is No Path and LEAVE A TRAIL.........
> UNNIKRISHNAN.R [08.gif]
> _________________________________________________________________
>
> It's here! Your new message!
> Get [4]new email alerts with the free [5]Yahoo! Toolbar.
>
> References
>
> 1.
http://ndcXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/
> 2.
http://il06exf60.ds.mot.com/exchweb/bin/redir.asp?URL=http://schema
s.xmlsoap.org/soap/envelope/
> 3.
http://il06exf60.ds.mot.com/exchweb/bin/redir.asp?URL=http://www.w3
..org/2001/XMLSchema%22%3E%3Csoap:Body%3E%3CVastera:CustomerValidat
ion_RequestInfo%3E%3CPartnerID%3E1036313774-0004-001%3C/PartnerID%3
E%3CPartnerType%3EPTNR_SHIP_TO%3C/PartnerType%3E%3CPartnerType%3EPT
NR_ULT_CONSIGNEE%3C/PartnerType%3E%3COperatingUnit%3E100%3C/Operati
ngUnit%3E%3CStatus%3EACTIVE%3C/Status%3E%3CCustomerSeqNumber%3E%3C/
CustomerSeqNumber%3E%3CCustomerName%3EKONEKTEL%3C/CustomerName%3E%3
CAddress1%3EADD1
> 4.
http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/too
lbar/features/mail/
> 5.
http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/too
lbar/features/mail/
>
>
>
-------------------------------------------------------------------
-----
>
>
-------------------------------------------------------------------
----
> This is the FTPAPI mailing list. To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
>
-------------------------------------------------------------------
----
>
-------------------------------------------------------------------
----
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-------------------------------------------------------------------
----
Do not follow Where the Path May LEAD,
Go instead where there is No Path and LEAVE A TRAIL.........
UNNIKRISHNAN.R [08.gif]
_________________________________________________________________
Cheap Talk? [1]Check out Yahoo! Messenger's low PC-to-Phone call
rates.
References
1. http://us.rd.yahoo.com/mail_us/taglines/postman8/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------