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 1.5.5.1)

replace:

'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

Advertisements

Leave a Reply :)

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s