svn: /web/php-master/trunk/entry/ event.php

From: Date: Tue, 16 Aug 2011 14:44:33 +0000
Subject: svn: /web/php-master/trunk/entry/ event.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-11933@lists.php.net to get a copy of this message
bjori Tue, 16 Aug 2011 14:44:33 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=315028 Log: Fixed bug#55177 (Unicode strings are cut incorrectly), patch by irker@ Bug: https://bugs.php.net/55177 (Open) Unicode strings are cut incorrectly Changed paths: U web/php-master/trunk/entry/event.php Modified: web/php-master/trunk/entry/event.php =================================================================== --- web/php-master/trunk/entry/event.php 2011-08-16 14:36:44 UTC (rev 315027) +++ web/php-master/trunk/entry/event.php 2011-08-16 14:44:33 UTC (rev 315028) @@ -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")

« previous php.webmaster (#11933) next »