Looks like UTF-8 nature of text is ignored, treating strings as sequences of single-byte characters...

CommentFileSizeAuthor
image12.png10.49 KBOnkelTem

Comments

OnkelTem’s picture

Status: Active » Closed (works as designed)

After debugging I see problem is not UTF-8 related and more in Drupal core, then in this module.

When using CKEditor with its default code formatting stuff, then after each opening and closing P tag it places sequence: \r\n\t
For example, if we type '0123456789' and save the node, then in database we get:

<p>\r\n\t0123456789</p>\r\n

both for body and teaser.

But after loading and building content of the node we get teaser equals:

<p>\r\n\t0123456789</p>\r\n

while $node->content['body']['#value'] contains:

<p>\n\t0123456789</p>\n ----- i.e. WITHOUT \r's!

This leads to miscalculations of insert position in function ed_readmore_link_place and thats the reason of breaking UTF-8 lines which is just the result and not the reason.