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

Re: Sending Big5 through httpapi



Hello,

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

HTTPAPI does not attempt to URL-encode your URI automatically.  It
assumes that you are passing a valid URL to it, that's already been
encoded accordingly.

The HTTP standard does not allow characters that are not part of
ISO-8859-1 (CCSID 819) in a URI.  The standards state that the HTTP
protocol will always use ISO-8859-1.

If you use the current BETA version of HTTPAPI, and you call the URL
encoding routines (which you are not currently doing) it'll allow you to
set an alternative CCSID via http_setCCSIDs() to use UTF-8 data, and
then it'll encode it for you to make it a valid URL.  But since you are
not even attempting to call those routines now, HTTPAPI is definitely
going to mistranslate your URL.

If your data never changes, you could do this:

   Eval      URL = 'http://somewhere.com'
                  + '/app/servlet/GenSendSM?'
                  + 'acc=my_acc'
                  + '&pwd=my_pwd'
                  + '&msisdn='
                  + '&msg=%a7%da';

This is (presumably) what the URL encoder would arrive at if you updated
and used the URL encoder...

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