Support truncation of mulitbyte srings
authornirgal <nirgal@users.noreply.github.com>
Fri, 4 Oct 2019 08:58:02 +0000 (08:58 +0000)
committerRobert Treat <rob@xzilla.net>
Sun, 13 Oct 2019 00:27:23 +0000 (20:27 -0400)
commitb24f5cae385137eddc487204a4c7a864de3d032b
tree806cc5eb35fbe21f9cf9acca2ccbf57e81b1fde2
parent1d5ca056572e93c5509f5052c39e080f07fadd9e
Support truncation of mulitbyte srings

This fixes https://sourceforge.net/p/phppgadmin/bugs/422/ :
substr truncates on a byte-level, sometimes within a multi-byte character. This resulted in the whole string sometime not being displayed. See the original bug report for a way to reproduce.

Please note that this requires php-mbstring to be installed. This is usually the case, but the dependency should be described in the INSTALL file or something.
classes/Misc.php