Tuesday 06 April 2010 6:57:28 am
Hi, I need to import articles. So, the articles include special characters within headline. I use eZContentObjectAttribute::fromString() method to set the content of the attribute. For example, the "£" character (headline as eZString datatype): Without encoding:
$contentObjectAttribute->fromString ( 'My £3M headline' ); Result: "My " (truncate string, either the url_alias: My) With html entity encoding:
$contentObjectAttribute->fromString ( 'My £3M headline' ); Result: "My £3M headline" (unwashed character, either the url_alias: My-pound-3M-headline) With utf8 encoding:
$contentObjectAttribute->fromString( 'My £3M headline' ); Result: "My £3M headline" (unwashed character, either the url_alias: My-163-3M-headline) Of course, it happens with all unASCII characters. Has anyone already dealt with this ? Best regards, Fabien.
|