You are here:  » htmlentities - Invalid multibyte sequence

Support Forum



htmlentities - Invalid multibyte sequence

Submitted by clare on Fri, 2011-09-16 10:01 in

Hi, I am getting a repeated error showing in apache logs saying
htmlentities() [function.htmlentities]: Invalid multibyte sequence in argument

referring to product.php and searchresults.php

I think it may be because some of the feeds I import may not be utf-8, and as i have utf-8 set as the config charset, maybe that is causing the error.

have you come across this before and is there a way to stop these errors, such as could i safely remove the charset parameter from those htmlentities() php lines in the relevant pages?(searchresults line 118 and products line 10)

Submitted by support on Fri, 2011-09-16 10:20

Hi Clare,

Removing the character set parameter should be OK; but alternatively, if you can identify the feeds that contain the encoding errors you could add UTF8 Encode filters to the Name and Description fields, re-import and that should prevent the warnings...

Cheers,
David.
--
PriceTapestry.com

Submitted by clare on Fri, 2011-09-16 11:34

Can I add UTF8 Encode filters to those fields on all feeds regardless?

Submitted by support on Fri, 2011-09-16 11:36

Hi Clare,

Sure - won't do any harm if you want to use a global filter instead!

Cheers,
David.
--
PriceTapestry.com