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

Re: Encoding in XML



Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>



1. I do not understand the question.

XML documents aren't normally in EBCDIC. Somehow you're converting the string containing the word "CABELA'S" to either ASCII or Unicode. I was under the impression that it was ISO 8859-1 ASCII, since you referenced that encoding in a previous message -- but now I'm not so sure.


My question was, what's the code point of the apostrophe character (the punctuation symbol immediately before the S in CABELA'S) after it has been converted?

By "code point" I mean the "hex value" of the character. If you're truly converting to ISO 8859-1, then I'd expect it to be x'27', but based on the way you've described your problem, I suspect it's not.


2. The ISO-8859-1 is in the response back.

Okay, then which encoding are you sending the CABELA'S string in?



3. The encoding in the XML document is : <?xml version="1.0"?> <Orders xml:lang="en-US">

This doesn't specify an encoding.


using, the encode subprocedure in CGIDEV2

The encode() procedure of CGIDEV2 will convert characters like & to &amp;. That's a useful function, and you're right, you need to do that. (I'd have used encode2(), however.)


However, this is a case where the word "encoding" is, perhaps, not specific enough. Yes, you need to encode your ampersands, quotes, less than signs, etc... but that wasn't what I was referring to.

I'm referring to the character encoding. A synonmym of the terms "codepage" and "CCSID". Except, instead of using an IBM-specific number, you use words like "UTF-8" or "ISO-8859-1" or "US-ASCII".

Hopefully that makes more sense.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------