in reply to Re: replacement for deprecated encoding pragma
in thread replacement for deprecated encoding pragma

PerlMonks is assumed by the browsers to be using the Latin-1 encoding. Anything entered into text entry fields but not fitting into Latin-1 is encoded into HTML entities. They work in the <pre> tags, but <code> tags are processed specially not to let anything HTML-looking be interpreted as HTML, so they are double-encoded on output. The result is that
привет
works, but &#1087;&#1088;&#1080;&#1074;&#1077;&#1090; doesn't. So it goes.

Replies are listed 'Best First'.
Re^3: replacement for deprecated encoding pragma
by LanX (Saint) on Jul 20, 2021 at 08:15 UTC
      You see, changing pre to code defeated the purpose of demonstrating the difference.
      In code view, you can't see the way it supposed to look.
        Narrowing down a problem to the essential is the first step of clever debugging.

        You want help for your Unicode problems, broken markup makes your post unreadable and will repel answers.

        Question: Do you want help?

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

        Are the HTML tags surrounding your <pre> (well, now <code>) tags necessary? Maybe simply posting the Cyrillic text is enough, and then you can use <pre> tags without needing to entity-encode your HTML?