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

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

  • Comment on Re^5: Counting bytes in a Unicode document

Replies are listed 'Best First'.
Re^6: Counting bytes in a Unicode document
by ikegami (Patriarch) on Oct 09, 2024 at 00:35 UTC

    No, it's not a bug that they don't return the size of something that's not passed to them.

    If anything, I would consider using either of those a bug. It's hard to imagine a reason to use them.

      Yes, I don't see a lot of purpose in bytes::length. But if you do want to do that, it's better than removing the utf8 flag and calling the normal length. But I have enormous questions around what the OP is even trying to do in the first place.
      --
      A math joke: r = | |csc(θ)|+|sec(θ)| |-| |csc(θ)|-|sec(θ)| |
      > something that's not passed to them.

      You are talking in riddles.

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

        If you don't pass the file to them, they can't return the length of the file, and it's not a bug that they don't.