<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Multibyte String Truncate Modifier for Smarty &#8211; mb_truncate</title>
	<atom:link href="http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/</link>
	<description>Keeping track of what I do</description>
	<lastBuildDate>Tue, 07 Feb 2012 23:33:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: TECHSARA &#187; smarty mb_truncate</title>
		<link>http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/comment-page-1/#comment-165158</link>
		<dc:creator>TECHSARA &#187; smarty mb_truncate</dc:creator>
		<pubDate>Tue, 31 Jan 2012 08:11:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/#comment-165158</guid>
		<description>[...] Truncate String  smarty mb_truncate    カテゴリー: PHP タグ:         コメント (0) トラックバック (0) [...]</description>
		<content:encoded><![CDATA[<p>[...] Truncate String  smarty mb_truncate    カテゴリー: PHP タグ:         コメント (0) トラックバック (0) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Coder.UA</title>
		<link>http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/comment-page-1/#comment-147326</link>
		<dc:creator>Coder.UA</dc:creator>
		<pubDate>Thu, 15 Dec 2011 15:15:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/#comment-147326</guid>
		<description>Thank you! Good work! :)</description>
		<content:encoded><![CDATA[<p>Thank you! Good work! <img src='http://www.guyrutenberg.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cálculo Diferencial e Integral II</title>
		<link>http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/comment-page-1/#comment-140211</link>
		<dc:creator>Cálculo Diferencial e Integral II</dc:creator>
		<pubDate>Tue, 29 Nov 2011 14:19:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/#comment-140211</guid>
		<description>&lt;strong&gt;Lista de problemas com o serendipity...&lt;/strong&gt;

É óbvio que há alguns problemas com o Serendipity. Este artigo será actualizado para manter a lista de problemas conhecidos, resolvidos e por resolver. A maioria dos problemas detectados têm a ver com internacionalização. De uma forma resumida:...</description>
		<content:encoded><![CDATA[<p><strong>Lista de problemas com o serendipity&#8230;</strong></p>
<p>É óbvio que há alguns problemas com o Serendipity. Este artigo será actualizado para manter a lista de problemas conhecidos, resolvidos e por resolver. A maioria dos problemas detectados têm a ver com internacionalização. De uma forma resumida:&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: patgod</title>
		<link>http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/comment-page-1/#comment-62360</link>
		<dc:creator>patgod</dc:creator>
		<pubDate>Tue, 08 Feb 2011 16:13:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/#comment-62360</guid>
		<description>Thanks/Спасибо</description>
		<content:encoded><![CDATA[<p>Thanks/Спасибо</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/comment-page-1/#comment-44699</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Tue, 19 Oct 2010 07:55:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/#comment-44699</guid>
		<description>Thank you for posting this, an excellent addition to Smarty and very useful for those of us working in UTF-8 only environments.</description>
		<content:encoded><![CDATA[<p>Thank you for posting this, an excellent addition to Smarty and very useful for those of us working in UTF-8 only environments.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/comment-page-1/#comment-29249</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Wed, 24 Feb 2010 12:04:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/#comment-29249</guid>
		<description>Nice plugin, works even better if previously suggested changes are made.

Additionally one can change the order of the function arguments. To match the order of things with classic smarty truncate, the charset should be passed after breakwords, so it would be:
$string, $length, $etc, $break_words ...

I placed that as last param, as php`s mb_ functions.

You can now prepend mb_ on all existing truncate modifier calls within the templates.

This is a very easy task using find/replace, which won&#039;t do so well with original argument order.
It would pass the former break_words as charset, mb_ functions will not be happy with it.</description>
		<content:encoded><![CDATA[<p>Nice plugin, works even better if previously suggested changes are made.</p>
<p>Additionally one can change the order of the function arguments. To match the order of things with classic smarty truncate, the charset should be passed after breakwords, so it would be:<br />
$string, $length, $etc, $break_words &#8230;</p>
<p>I placed that as last param, as php`s mb_ functions.</p>
<p>You can now prepend mb_ on all existing truncate modifier calls within the templates.</p>
<p>This is a very easy task using find/replace, which won&#8217;t do so well with original argument order.<br />
It would pass the former break_words as charset, mb_ functions will not be happy with it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vladimir Dokuzanov</title>
		<link>http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/comment-page-1/#comment-24460</link>
		<dc:creator>Vladimir Dokuzanov</dc:creator>
		<pubDate>Sat, 24 Oct 2009 22:08:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/#comment-24460</guid>
		<description>Thanks for this plugin.
There is a small problem in the code.
On line 36 and line 37 instead of strlen must be used mb_strlen.
So it should be:
    if (mb_strlen($string, $charset) &gt; $length) {
        $length -= min($length, mb_strlen($etc, $charset));

:)</description>
		<content:encoded><![CDATA[<p>Thanks for this plugin.<br />
There is a small problem in the code.<br />
On line 36 and line 37 instead of strlen must be used mb_strlen.<br />
So it should be:<br />
    if (mb_strlen($string, $charset) &gt; $length) {<br />
        $length -= min($length, mb_strlen($etc, $charset));</p>
<p> <img src='http://www.guyrutenberg.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hen</title>
		<link>http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/comment-page-1/#comment-22111</link>
		<dc:creator>Hen</dc:creator>
		<pubDate>Fri, 31 Jul 2009 08:51:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/#comment-22111</guid>
		<description>Great work,
I have exactly the problem you described in your post. Thanks for this plugin.</description>
		<content:encoded><![CDATA[<p>Great work,<br />
I have exactly the problem you described in your post. Thanks for this plugin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/comment-page-1/#comment-17728</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Thu, 26 Mar 2009 14:58:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/#comment-17728</guid>
		<description>tics +1</description>
		<content:encoded><![CDATA[<p>tics +1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tics</title>
		<link>http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/comment-page-1/#comment-17221</link>
		<dc:creator>tics</dc:creator>
		<pubDate>Wed, 18 Mar 2009 12:41:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/#comment-17221</guid>
		<description>In UTF8, if you don’t put “/u” at the end of pattern, you may have a problem at the end of accentued caracters.

$string = preg_replace(’/\s+?(\S+)?$/u’, ”, mb_substr($string, 0, $length+1, $charset));

Best regards
tics</description>
		<content:encoded><![CDATA[<p>In UTF8, if you don’t put “/u” at the end of pattern, you may have a problem at the end of accentued caracters.</p>
<p>$string = preg_replace(’/\s+?(\S+)?$/u’, ”, mb_substr($string, 0, $length+1, $charset));</p>
<p>Best regards<br />
tics</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.258 seconds -->

