ZenCart 1.5.6c, MariaDB 10.3.20, PHP 7.3.11
Hi all,
I noticed my Japanese products strangely truncated in sideboxes, and concluded the culprit was the zen_trunc_string function in includes/functions/functions_general.php
Searching online and the forums, I saw this had already been covered in 2017 here:
https://www.zen-cart.com/showthread....-String-Length
Changing the 7 instances of substr and strlen into their multibyte equivalents solved the problem for me also.
lat9 had submitted a pull request at that time, but clearly it did not make it into 1.5.5c or later.
Looking at the PR, Dr. Byte noted that implementing this throughout Zen Cart this is a large job.
Still, it certainly helps to change just this particular function.
At least a solution is available, even if it is not implemented soon throughout the application.
Bookmarks