presta-dyr Posted July 26, 2009 Share Posted July 26, 2009 I discovered that the truncate modifier in smarty did not work properly with the Danish national characters æ, ø and å. I found out that the problem was in tools/smarty/plugins/modifier.truncate.php.If found an html_strlen and an html_substr function in the PHP manual and also put in mb_substr to fix this. It probably won't do to hard code "utf-8" in smarty in general, but it cured my (PrestaShop's?) problem.I have attached modifier.truncate.php./Kjeld modifier.truncate.php 1 Link to comment Share on other sites More sharing options...
hatc Posted July 27, 2009 Share Posted July 27, 2009 kjeld,Do this fix the problem with the ÆØÅ problems inside the codes, or where do this fix appear ?/Henrik Link to comment Share on other sites More sharing options...
presta-dyr Posted July 27, 2009 Author Share Posted July 27, 2009 Yes, this fixes problems with æ, ø and å (and a lot of other non-7-bit-ASCII characters). E.g. when you put an item in the basket, the last letter could look like �. Also, the length of the shortened texts were often less than expected. E.g. the letter "å" should have a length of 1 but the length was calculated to 7 (the length of "å")./Kjeld Link to comment Share on other sites More sharing options...
Alekhine Posted August 6, 2009 Share Posted August 6, 2009 Thank You !! Link to comment Share on other sites More sharing options...
clankipad Posted October 10, 2016 Share Posted October 10, 2016 thanks Link to comment Share on other sites More sharing options...
mahirozel Posted May 16, 2017 Share Posted May 16, 2017 thanks Link to comment Share on other sites More sharing options...
Recommended Posts