product description utf-8 problem

I notice on product description utf-8 problem showing diamond at end of the line

after some searching in google i found this

open the desired module from catalog\controller\module

like latest module is latest.php

on line  82 (opencart


'description' => substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 100) . '..',

with this:

'description' => mb_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 100, 'UTF-8') . '..',

notice the change of substr to mb_substr

and adding ‘UTF-8’ as new argument


Leave a Reply :)

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s