Skip to content

Cyrillic text appears scrambled #18

@kerpi4

Description

@kerpi4

See the screenshot below.

Did a little digging and fixed it by adding meta tag to specify encoding where the new document is created in extractReal() from Content.php.

private function extractReal(): void
    {
        $dom = new \DomDocument('1.0', 'UTF-8');
        $content = htmlspecialchars_decode(htmlentities(html_entity_decode(
$this->raw)));
        $dom->loadHTML(
            "<meta http-equiv='Content-Type' content='charset=utf-8' /><div
>$content</div>",
            LIBXML_NOERROR
        );
...

Not sure how good of a solution this is. So if you wanna look into it I'd be grateful.

Screenshot_2024-02-29-12-51-22

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions