in reply to Re: Counting bytes in a Unicode document
in thread Counting bytes in a Unicode document

Remove temporarily the utf8 flag and use length then.
You can just use bytes::length (after use bytes ();).

--
A math joke: r = | |csc(θ)|+|sec(θ)| |-| |csc(θ)|-|sec(θ)| |

Replies are listed 'Best First'.
Re^3: Counting bytes in a Unicode document
by LanX (Saint) on Oct 08, 2024 at 10:01 UTC

      Both of those hacks will fail on Windows or if a decoding error occurs.

        You mean both bytes hacks, or also removing the utf8 flag manually?

        In any case, isn't that a bug?

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