[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Non english characters and http_url_get
hello Matthias,
I have to admit that I'm a little confused by your example URL. That
URL points to a web page that's heavy on JavaScript and HTML. I'm
having a hard time conceiving of how that page would be useful in
HTTPAPI... it seems like that'd only be useful from a web browser.
I've tried the URL, and no matter how I try, I can't get the words
"Unter Führung" (either spelled correctly or incorrectly) to come up in
the URL. It appears that I'd have to write a JavaScript parser to get
those words
Having said that... your example shows one correct character being
replaced with two invalid ones. In my experience, that means that
you're trying to view a UTF-8 encoded document as if it's ASCII -- or
you're telling the system to translate it from ASCII to EBCDIC -- and
since it's not ASCII, but UTF-8, you have problems.
With HTTPAPI and http_url_get(), the solution is to tell HTTPAPI that to
mark the file you're downloading as UTF-8 (CCSID 1208) instead of the
default of ISO-8859-1 (a flavor of ASCII, CCSID 819).
To do that, put this code before your http_url_get():
callp HTTP_SetFileCCSID(1208)
If the document isn't UTF-8, but is something else, then you need to
supply the correct CCSID for whatever it is. HTTPAPI doesn't know what
the document is, so if you don't tell it otherwise, it'll default to
CCSID 819.
Matthias Schatte wrote:
> Hello,
> i have to download a html site with special german characters. I use
> the procedure http_url_get
> .
> For example: [1]http://www.heise.de/pda/newsticker/m105633.html
> "Unter Führung" <- this is right.
> With http_url_get i get "Unter Führung"
> What can i change in my RPG program?
> --
> Matthias
>
> References
>
> 1. http://www.heise.de/pda/newsticker/m105633.html
>
>
>
> ------------------------------------------------------------------------
>
> -----------------------------------------------------------------------
> 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
-----------------------------------------------------------------------