#1647 closed defect (bug) (fixed)
Broken trackback ping in UTF-8
Reported by: | thinkini | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 1.5.2 |
Component: | General | Keywords: | bg|needs-patch trackback utf-8 |
Focuses: | Cc: |
Description
Wordpress cuts excerpt with substr function
It works well in case of single byte word.
But multi bytes word is cut incoreectly.
The last letter of cut word is broken.
Wordpress changes encoding automatically using mb_convert_encoding.
If the last letter is broken, Wordpress understands that trackback is not UTF-8.
Then trackback is converted UTF-8 by mb_convert_encoding.
it means, all contents in the trackback is broken except the single byte word.
Wordpress uses mbstring module for international trackback.
So open /wp-includes/functions-post.php and find do_trackbacks function
$excerpt = substr($excerpt, 0, 252) . '...';
replace it with
if ( function_exists('mb_strcut') ) For international trackbacks
$excerpt = mb_strcut($excerpt, 0, 252, get_settings('blog_charset')) . '...';
else
$excerpt = substr($excerpt, 0, 252) . '...';
(In [3081]) Cut international trackbacks, fixes #1647