Welcome to Habari, Harry. Thanks for finding this problem. Habari currently has some issues with multibyte characters. Some are known, others, like this one, are not. If you find any others, it would be great if you made a ticket about it on trac ( http://trac.habariproject.org/habari/ ), and if you have a patch, as you do for this, you can attach it to the ticket.
Rick On Aug 28, 10:48 am, harry <[EMAIL PROTECTED]> wrote: > Hi, I'm new to habari, and sorry for my English first. > > I found in the admin/posts_items.php use the substr to cut the post > content string, it works fine in English. But my posts are Chinese, > the substr function may split a Chinese char, so there will be a bad > char like follow the content string. > > This problem will not cause error in general situation. But the > json_encode function may not know the char, so the json_encode > function will stop parse when meet the bad char and strings after the > bad char will lost. Just strings before the bad char will be encoded > and return. > > So, when I in the manage entry page, the cool Ajax timeline will not > working normally, it usually can't shows full entries. > > My suggestion is use the mb_substr function. > I change the code to echo mb_substr( strip_tags( $post->content ), 0, > 250, 'UTF-8'); > It works fine :) > > Sorry for my English again, and thanks for your patience to read. Hope > that helps. :) --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/habari-dev -~----------~----~----~----~------~----~------~--~---
