php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch fix_wrong_utf_string_cut.patch for Website problem Bug #55177Patch version 2011-08-16 13:23 UTC Return to Bug #55177 | Download this patchThis patch renders other patches obsolete Obsolete patches: Patch Revisions:
Developer: irker@php.netIndex: entry/event.php =================================================================== --- entry/event.php (revision 314981) +++ entry/event.php (working copy) @@ -26,6 +26,9 @@ die("I feel for you"); } +// utf8 safe truncate, while php not compile with mb_string +$l = 32; while (strlen($sdesc) > 32) { $sdesc = iconv_substr($sdesc, 0, $l--, 'UTF-8'); } + @mysql_connect("localhost","nobody", "") or die("failed to connect to database"); @mysql_select_db("phpmasterdb") |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Fri Dec 27 02:01:29 2024 UTC |