The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Character encoding for XML Data Feed

mhenry07mhenry07 Member
in Help edited September 2008

What character encoding is used to encrypt, URL encode and post the XML Data Feed? Is it UTF-8 or ISO 8859-1 throughout?

The reason I ask is that I had trouble getting the XML test post script to work. It turned out that the PHP was working in ISO 8859-1 on my dev box but my browser claimed the test script was outputting UTF-8. So when decoding the URL and decrypting an encrypted string it's pretty important that the character encodings match the source character encodings.

Is there any way that the test script can be clarified and/or updated to force the expected encoding(s) (e.g. via
) so the test matches the actual feed? Alternatively, sample php.ini settings might be helpful.

  • fredfred FoxyCart Team
    Hi Mike,

    We send the datafeed to your script with a MIME-type of application/x-www-form-urlencoded, which entails ASCII character encoding per the definition of "URL encoding" in RFC 1738.

    I think that if your PHP install is using non-ISO-8859-1 strings (e.g., you have the mbstring extension installed), the RC4 decryption might fail. Could you send the output of phpinfo() on your dev server, specifically the 'mbstring' section, if present?
  • Thanks for your reply Fred.

    So does that mean I should be expecting the encrypted and plain XML from FoxyCart's server(s) to be ISO 8859-1?

    It just seems that ISO 8859-1 is inconsistent with the
    statements in the sample SQL script included with the XML test post script, along with the other JavaScript and CSS samples that use

    Oops, the UTF-8 encoding reported by Firefox appears to have been my fault ... I must have saved the test_xml_datafeed.php as UTF-8 when trying to get things working.

    Regarding URL encoding, I am aware that the submitted data is URL encoded, but in order to decode it properly one needs to know the original encoding if it could be different from the source server. For example an
  • lukeluke FoxyCart Team
    Hey Mike, great to see you in the forum. We have more people involved in our Foxy world than just Brett and myself, but we're definitely those most active in the forum. You'll probably see a lot more of Fred in the coming months as he's beginning to dive into our code and make it more awesomer. :)

    Awesomer is not a word, I but I think it should be.

    Mike, did you guys get everything working yesterday? Mark had some questions, I sent him to Ron and Ron said everything got worked out. If you need any help today, give me a call.
Sign In or Register to comment.