I solved this problem by replacing all lines, which includes this function, from htmlentities($some_text) to htmlentities($some_text, ENT_COMPAT, "UTF-8").
Would be better to make some patch for this, but it must to include also support for other, non-utf charsets, so i don't know, how to do it quickly and correctly
