Content encoded as UTF-8 get the wrong content length due to use of strlen which is not UTF-8 safe.

Replace strlen with mb_strlen or strlen(utf8_encode($str)) to remedy the issue. Probably should make sure the content is actually UTF-8 encoded too before strlen'ing it!

Comments

SimmeLj’s picture

Status: Active » Closed (works as designed)