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

Sending Big5 through httpapi



   Hi,


   I am using version 1.23 and trying to send out data by RPG using
   HTTPAPI from AS400 to a PC with CCSID 950

   eval      rc = http_url_get(

                  URL :result :2)

   See [Detail] below

   In remote server, it cannot receive Big5 Code correctly, (English
   Character is fine)

   It is mapping X’4F5C’ to X’7C2A’, which seems to be CCSID 819

   I want to map X’4F5C’ to X’A7DA’ in AS400 before sending out to
   remote PC server,

   I try to use different values in HTTP_SetCCSIDs(remote:local), none of
   them are working, can anyone help?


   [Detail]

   Here is the code,

   Case 1

   Eval      URL = 'http://somewhere.com'

                  + '/app/servlet/GenSendSM?'

                  + 'acc=my_acc'

                  + '&pwd=my_pwd'

                  + '&msisdn='

                  + '&msg=’

   + X’4F5C’

   X’4F5C’ is value stored in AS400 representing a Big5 Chinese
   Character’我’

   When using Comm. Trace by STRCMNTRC to capture the bytes sending out
   from LAN card in AS400, it shows (hex value)

   ….6D73673D7C2A…. means

   …. m s g =

   ‘6D7367’ => ‘msg’, that is fine, but X’7C2A’ not correct for
   ”我”, it should be X’A7DA’ which is a correct ASCII value in
   remote PC server

   The value X’A7DA’ can be checked in
   [1]http://www.microsoft.com/hk/hkscs/code/Big5_A7.htm


   Case 2

   However, if

   Eval      URL = 'http://somewhere.com'

                  + '/app/servlet/GenSendSM?'

                  + 'acc=my_acc'

                  + '&pwd=my_pwd'

                  + '&msisdn='

                  + '&msg=’

   + X’B5FE’

   The result is correct,

   ….6D73673DA7DA…. means

   …. m s g =我

   The value X’B5FE’ can be checked in

   About EBCDIC to ASCII with ISO-8859-1,
   [2]http://www.flounder.com/ebcdictoascii1.htm

   About ISO-8859-1 is IBM-819
   [3]http://demo.icu-project.org/icu-bin/convexp

   It seems to be using CCSID 819



   callp     HTTP_SetCCSIDs(950:65535)   4F5C -> 4F5C  with Error

   Explanation: using CCSID with remote = 950 and local = 65535, and hard
   code the value &msg=X’4F5C’, get the hex value in Comm Trace as
   X‘4F5C’, and error return from remote server


   callp     HTTP_SetCCSIDs(937:65535)   4F5C -> 4F5C  with Error

   callp     HTTP_SetCCSIDs(65535:937)   4F5C -> 4F5C  with Error

   callp     HTTP_SetCCSIDs(65535:950)   4F5C -> 7C2A  no Error

   callp     HTTP_SetCCSIDs(950:37)      4F5C -> 7C2A  no Error

   callp     HTTP_SetCCSIDs(950:937)     4F5C -> 7C2A  no Error

   callp     HTTP_SetCCSIDs(937:950)     4F5C -> 7C2A  no Error

   callp     HTTP_SetCCSIDs(367:950)     Error no output

   callp     HTTP_SetCCSIDs(1208:0)      4F5C -> 7C2A  no Error

   callp     HTTP_SetCCSIDs(1208:937)    4F5C -> 7C2A  no Error


   For Chinese character “我”

   Stored in PC as ASCII – hex value –> x’A7DA’

   Expected EBCDII – hex value ->x’B5FE’

   Stored in AS400 File – x’4F5C’

   QTCPASC is used as 7C2A (can be checked by - WRKTBL TBL(QTCPASC)

References

   1. http://www.microsoft.com/hk/hkscs/code/Big5_A7.htm
   2. http://www.flounder.com/ebcdictoascii1.htm
   3. http://demo.icu-project.org/icu-bin/convexp
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------