I have $config_charset set to "UTF-8" in my config file
ie: $config_charset = "utf-8";
In my header.php I have this bit of php
<?php
if ($config_charset)
{
header("Content-Type: text/html;charset=".$config_charset);
}
?>
But the Content-Type doesn't appear in the code of any of my pages.
I might be barking up the wrong tree but I trying to get replace ’ and ™ etc which are appearing in Awin datafeeds with the correct comma or apostrophe where applicable.
Any help would be appreciated.
OK - I'm feeling really dim now.
I've had this problem for 4 years alomst, about time I got it sorted.
I download an AWIN feed, save it and drop it into my feeds folder...
I attempt to register the feed but all the items appear with "quotes" round them in admin/feeds_register.
Although the feed will register none of the links or images work because of the "quotes" around them in the source.
I've been geeting round this by opening the downloaded datafeed in OpenOffice Calc and saving it as a csv then dropping it to my feeds folder.
This gets rid of the "quotes" but everytime a ' or , or " appears they show on my site as numbers like THEY8257RE instead of THEY'RE.
It can't just be happening to me surely?
Hi,
It just sounds like the auto-detect is not picking up the quoted text, so rather than accepting the auto-detected format string you need to select the correct format from the drop-down box on Feed Registration (Step 1).
The most likely is "Quoted Text - Header Row - Comma Separated", but if you're not sure, an alternative way is to replace the last 0 in the auto-detected format string with 44, for example:
csv|44|1|34
Cheers,
David.
Hi David
This does solve my "quote" problem on registering, so thank you - but not the character issue.
I just googled Airsprung39s (should be Airsprung's) and the results show up a number of sites including some running price tapestry that appear have the same problem with Awin feeds.
Originally, I just assumed it was a charset error but have been testing all day with a fresh PT download and I'm still stuck.
Hi,
This is more likely that the ' is entity encoded within the description (it's a nightmare to permit these characters in the product name and preserve search engine friendliness) - but you can permit them within the description quite easily - in includes/admin.php, look for the following code on line 165:
$record[$admin_importFeed["field_description"]] = tapestry_normalise($record[$admin_importFeed["field_description"]],",'\'\.%!");
...and replace with:
$record[$admin_importFeed["field_description"]] = tapestry_normalise($record[$admin_importFeed["field_description"]],",'\'\.%!&#");
This should permit the encoded ' character within the description field...
Cheers,
David.
Just another quickie on this before I put it to bed.
Is there a away of normalising product names too?
Two of my stongest sellers are
Dolce & Gabbana and D&G
I've Webgains' feed showing products as "Dolce Gabbana" and Awin's as "Dolce amp Gabbana"
Same with D&G It's either DG or DampG.
Thanks for all your help!
Hi,
I would use filters to handle this situation, taking into account that & and ; have already been stripped, leaving you with "amp"; so a Search and Replace (on Product Name) for " amp " with " and " (include the spaces so that other instances of amp are not affected) should do the trick. Where a littoral & has been stripped on its own, search for the resulting text, e.g. "DG" and replace with "D and G" (or as required)...
Cheers,
David.
Hi,
The content-type header doesn't appear as part of the HTML body as it is an HTTP header. To see that it is being set, you would need to use a header display tool, such as the one that is part of the Web Developer plugin for firefox.
Affiliate Window datafeeds are all utf-8 as far as I know so those characters should appear correctly - if not, it's always worth trying iso-8859-1 temporarily to see if that fixes it; and if so, you could then revert back to utf-8 and then use the UTF8 Encode filter on the relevant feeds / fields to fixup the individual feeds...
Cheers,
David.