Title: substr() vs. mb_substr()
Last modified: August 21, 2016

---

# substr() vs. mb_substr()

 *  [Sovichet Tep](https://wordpress.org/support/users/so_vichet/)
 * (@so_vichet)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/substr-vs-mb_substr/)
 * Hello,
 * I want to say that Smooth Slider is great for content slider. I found a small
   point maybe you can fix it in the next version of Smooth Slider. My site is Khmer
   language (it’s Unicode, UTF-8) and I set number of Maximum content size in Smooth
   Slider then it shows “Replacement Character” or “\uFFFD” or � and the end of 
   cut content text in front-end. I had tried to find a solution to fix it and I
   found that mb_substr() can solve this problem.
 * Here’s what I changed to:
    _In DIR\smooth-slider\slider\_versions\smooth\_1.php:
   131_ `$slider_excerpt = mb_substr($slider_content,0,$smooth_slider['content_chars'],'
   UTF-8');`
 * Reference: [http://stackoverflow.com/questions/1973649/php-function-substr-problem](http://stackoverflow.com/questions/1973649/php-function-substr-problem)
 * Cheers,
    Sovichet
 * [http://wordpress.org/plugins/smooth-slider/](http://wordpress.org/plugins/smooth-slider/)

The topic ‘substr() vs. mb_substr()’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/smooth-slider_e7cacb.svg)
 * [Smooth Slider](https://wordpress.org/plugins/smooth-slider/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smooth-slider/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smooth-slider/)
 * [Active Topics](https://wordpress.org/support/plugin/smooth-slider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smooth-slider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smooth-slider/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Sovichet Tep](https://wordpress.org/support/users/so_vichet/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/substr-vs-mb_substr/)
 * Status: not resolved