You are here:  » Quick question on search and replace...

Support Forum



Quick question on search and replace...

Submitted by daem0n on Thu, 2009-02-26 11:04 in

I have a strange symbol of in some of my feeds. It ends-up showing-up as (if that doesn't show-up, then maybe this will: �). I've tried a search and replace to replace it with a ' (regular apostrophe) but it doesn't work. I imagine this isn't working because this is a special character or something. Is there any way for me to do a filter for this character? It wouldn't be bad if it showed-up as it looks originally but instead it shows up as that weird FF-FD character that you should be able to see above.

Hopefully it shows-up so you know what I'm talking about ;).

Thanks! -Joe

Submitted by support on Thu, 2009-02-26 11:46

Hello Joe,

Where � appears in place of the proper character normally indicates a character set mis-match between the feed data and the configuration value you have in config.php for $config_charset. The first thing to do, if it is currently utf-8 is to try:

  $config_charset = "iso-8859-1";

If that doesn't help, or does fix this problem but makes other characters appear incorrectly then try using one of the UTF8 Encode or UTF8 Decode filters against the field containing these characters (Product Name or Description) and that should fix the problem.

If not, let me know, and I'll help you through adding the character codes as the search part of Search & Replace...

Cheers,
David.

Submitted by daem0n on Fri, 2009-02-27 03:44

Hi David,

Thanks for that, I thought it was already set to ISO but apparently not. So it did help with that feed but now one of my other feeds doesn't come in quite properly. For the most part it's ok, I've allowed certain characters to make it work, etc. There's just one character that's throwing me for a loop. It's which they're using as a quote mark like ". The problem is, when the feed is imported, for some reason, this character is replaced with the "-" character. I can't do a search and replace of "-" because I need it in other places.

Do you have any suggestions for this character? I tried adding it in the admin.php file description field (to leave it in the final product) but it still converts it to a "-" character.

Thanks! -Joe

Submitted by support on Fri, 2009-02-27 10:37

Hello Joe,

I'm not sure where it will be being converted, unless it's something the database is doing. Could you email me your includes/admin.php and I'll check it out...

Cheers,
David.

Submitted by daem0n on Fri, 2009-03-20 08:27

Hey David,

This modification was working really well (and still is by most means) for all feeds except for one. I have one feed using this character "´". The character is showing up as an image though so it's not properly decoding. I tried search and replace, encode as well as decode to no avail. Do you have any ideas? They're using the character as an apostrophe so I can replace the character with "'" or just convert the coding somehow.

Let me know what you suggest or think about it. Thanks a lot as always, your help is always much appreciated!

-Joe

Submitted by support on Fri, 2009-03-20 11:23

Hi Joe,

Do you mean that you've tried doing search "´" replace with "'" (both without the quotes, of course) - but the character remains unchanged?

On the page where the character is being displayed as an image - i'm assuming you mean one of those little squares with small numbers inside) could you try changing the character set between ISO-8859-1 and utf-8 using your web browsers View > Character Encoding menu and see if this makes any difference?

Otherwise, if you could email me a link to your site and the filename of the feed i'll download it from your /feeds/ folder to my test server and take a look for you!

Cheers,
David.

Submitted by daem0n on Sat, 2009-03-21 06:05

Hi David,

Thanks for deciphering my cryptic message. I wrote it really late and wasn't thinking clearly obviously. You are exactly correct in your re-description of the program. I found using the encoding in my web browser that I can get the text to show up properly if I set it to ISO-8859-1. I have UTF-8 set in my config file. I think that's what we decided on last time and has been working for most feeds...I usually just re-encode the feed with a filter.

I'll email you the link to the feed and you can take a look.

Thanks a lot David, much appreciated!! -Joe