You are here:  » Preparing data for import

Support Forum



Preparing data for import

Submitted by webie on Mon, 2008-02-18 00:14 in

Hi Dave,

Just preparing new database and i would like to strip out all unwanted tags just leave pure text for product name and product description.

Is it also possible to convert product name to capitalise text before import and capitalise product descriptions after . or ,.

If you see example below I have this within the product name ™ and also this Â. in product descriptions I have tried removing with this line of code from the forums but has not worked.

Code from the forums

<?php
 $record
[$admin_importFeed["field_name"]] = str_replace("™","",$record[$admin_importFeed["field_name"]]); 
?>

is there a better way of removing rogue characters or is this encoding problem if it is encoding problem can we convert to utf-8 or Latin 1 to be honest i am not sure what should be using for the UK.

EXAMPLE
Airplay™ Boost Video FM Transmitter iPod Vid AirPlay Wht
· Wireless FM transmitter for iPod Video 5th generation · Play your iPod through your car or home radio · No battery required, powered by the iPod · Perfectly flush fit

Many Thanks

Darren

Submitted by support on Mon, 2008-02-18 08:55

Hello Darren,

Yes - those characters are the result of incorrect encoding. You should not need to have to replace them out using str_replace() - instead try the following character set configuration in config.php:

  $config_charset = "utf-8";

If it is already utf-8, then it most like going to be iso-8859-1, so use:

  $config_charset = "iso-8859-1";

Regarding the case of product names and descriptions, I did the code for that just last week! Here is the thread:

http://www.pricetapestry.com/node/1876

Cheers,
David.

Submitted by webie on Mon, 2008-02-18 14:04

Hi Dave,

After many hours of trying different post from the forum i took alook in the feed in question and infact it was bad feed so even when i set encoding it did not help so just deleted the feed and i download a new one to see if it is the same.

cheers

Darren