{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/11026","repository_url":"https://api.github.com/repos/yiisoft/yii2","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/11026/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/11026/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/11026/events","html_url":"https://github.com/yiisoft/yii2/issues/11026","id":138486684,"number":11026,"title":"BaseStringHelper::truncateHtml not work correctly with UTF-8","user":{"login":"tol17","id":6351270,"avatar_url":"https://avatars.githubusercontent.com/u/6351270?v=3","gravatar_id":"","url":"https://api.github.com/users/tol17","html_url":"https://github.com/tol17","followers_url":"https://api.github.com/users/tol17/followers","following_url":"https://api.github.com/users/tol17/following{/other_user}","gists_url":"https://api.github.com/users/tol17/gists{/gist_id}","starred_url":"https://api.github.com/users/tol17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tol17/subscriptions","organizations_url":"https://api.github.com/users/tol17/orgs","repos_url":"https://api.github.com/users/tol17/repos","events_url":"https://api.github.com/users/tol17/events{/privacy}","received_events_url":"https://api.github.com/users/tol17/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yiisoft/yii2/labels/status:ready%20for%20adoption","name":"status:ready for adoption","color":"02e10c"},{"url":"https://api.github.com/repos/yiisoft/yii2/labels/type:enhancement","name":"type:enhancement","color":"d7e102"}],"state":"open","locked":false,"assignee":{"login":"samdark","id":47294,"avatar_url":"https://avatars.githubusercontent.com/u/47294?v=3","gravatar_id":"","url":"https://api.github.com/users/samdark","html_url":"https://github.com/samdark","followers_url":"https://api.github.com/users/samdark/followers","following_url":"https://api.github.com/users/samdark/following{/other_user}","gists_url":"https://api.github.com/users/samdark/gists{/gist_id}","starred_url":"https://api.github.com/users/samdark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samdark/subscriptions","organizations_url":"https://api.github.com/users/samdark/orgs","repos_url":"https://api.github.com/users/samdark/repos","events_url":"https://api.github.com/users/samdark/events{/privacy}","received_events_url":"https://api.github.com/users/samdark/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/yiisoft/yii2/milestones/16","html_url":"https://github.com/yiisoft/yii2/milestones/2.0.8","labels_url":"https://api.github.com/repos/yiisoft/yii2/milestones/16/labels","id":1242959,"number":16,"title":"2.0.8","description":"","creator":{"login":"cebe","id":189796,"avatar_url":"https://avatars.githubusercontent.com/u/189796?v=3","gravatar_id":"","url":"https://api.github.com/users/cebe","html_url":"https://github.com/cebe","followers_url":"https://api.github.com/users/cebe/followers","following_url":"https://api.github.com/users/cebe/following{/other_user}","gists_url":"https://api.github.com/users/cebe/gists{/gist_id}","starred_url":"https://api.github.com/users/cebe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cebe/subscriptions","organizations_url":"https://api.github.com/users/cebe/orgs","repos_url":"https://api.github.com/users/cebe/repos","events_url":"https://api.github.com/users/cebe/events{/privacy}","received_events_url":"https://api.github.com/users/cebe/received_events","type":"User","site_admin":false},"open_issues":123,"closed_issues":54,"state":"open","created_at":"2015-08-05T22:18:21Z","updated_at":"2016-03-06T09:34:18Z","due_on":"2016-03-19T23:00:00Z","closed_at":null},"comments":2,"created_at":"2016-03-04T14:19:03Z","updated_at":"2016-03-06T11:54:39Z","closed_at":null,"body":"Problem in line:\r\n168: `$currentCount = str_word_count($token->data);`\r\nThis function return not correctly word count, if string in MB code (in my case - russian).\r\n\r\nThere are many reliases for function str_word_count_utf8($str).\r\nI suggest to choose the best."},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/192879675","html_url":"https://github.com/yiisoft/yii2/issues/11026#issuecomment-192879675","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/11026","id":192879675,"user":{"login":"tol17","id":6351270,"avatar_url":"https://avatars.githubusercontent.com/u/6351270?v=3","gravatar_id":"","url":"https://api.github.com/users/tol17","html_url":"https://github.com/tol17","followers_url":"https://api.github.com/users/tol17/followers","following_url":"https://api.github.com/users/tol17/following{/other_user}","gists_url":"https://api.github.com/users/tol17/gists{/gist_id}","starred_url":"https://api.github.com/users/tol17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tol17/subscriptions","organizations_url":"https://api.github.com/users/tol17/orgs","repos_url":"https://api.github.com/users/tol17/repos","events_url":"https://api.github.com/users/tol17/events{/privacy}","received_events_url":"https://api.github.com/users/tol17/received_events","type":"User","site_admin":false},"created_at":"2016-03-06T11:54:39Z","updated_at":"2016-03-06T11:54:39Z","body":"I have seen such a pre-processing line:\r\n`$string = str_replace(\"\\xC2\\xAD\",'', $string);        // soft hyphen encoded in UTF-8`\r\n[https://en.wikipedia.org/wiki/Soft_hyphen]"}}