News:

Support the VirtueMart project and become a member

Main Menu

Special letters like Ø in title and metadescription

Started by Ihateit, February 26, 2013, 14:22:29 PM

Previous topic - Next topic

Ihateit

Hey forum,

im trying to echo ø into title and the meta description in the view.html.php file of the productdetails folder. Im using this code:
$document->setDescription($category->category_name." | ".$this->product->mf_name." | Koeb K&oslash;b billig ".$product->product_name." | ".str_replace(array(':', '<strong>'), "", (str_replace("</strong>", ".", (str_replace("<br/>", " ", ($product->product_s_desc)))))));

But it just renders the square with the question mark in it. If i use &oslash; it just renders "&oslash;" and if i use ø it renders the square with a question mark in it. The charset on the page is <meta charset="UTF-8">, but i dont know if i need to set the charset inside the php file aswell?
Or what could be the reason for this. If i write ø in an menu item title, it renders it perfectly in the title when viewed in my browser. Its only when i try to do it in php its failing.

Could i make the str_replace() more simple? Instead of using it 3 times.

//Ihateit