You are here:  » Feed Result is being prepended


Feed Result is being prepended

Submitted by ukdave on Fri, 2006-07-14 00:44 in

I just bought MagicParser and have successfully managed to retrieve the data feed I wanted it for but have found that the result for "DELIVERYCOST" is being prepended like this £1.00. It doesn't happen with words like "Free" so think it has something to do with the £ pound symbol.

How do I get rid of it?

Thanks.

Submitted by support on Fri, 2006-07-14 06:22

Hi There,

This is a character encoding issue; and is happening probably because the web page that you are generating from the data in your feed is not in the same character set as your feed.

Firstly, to discover what character set the data is encoded with; use your web browser's View > Character Encoding menu to try either UTF-8 or ISO-8859-1 (the two most common encoding formats). By selecting one of those sets the £ sign should then be displayed properly, and it is this character set that you must send in a Content-Type header in the output of your script in order for the page to be viewed correctly.

To do this; add one of the following statements to the very top of your script - it must be before any output has been generated:

<?php
  header
("Content-Type: text/html;charset=utf-8");
?>

or

<?php
  header
("Content-Type: text/html;charset=iso-8859-1");
?>

Hope this helps,
Cheers,
David.

Submitted by ukdave on Fri, 2006-07-14 10:20

Thank you very much David, it was UTF-8.