Encode::Detect(3pm)

✨ NAME ✨

Okay so bestie, welcome to Encode::Detect(3pm), brought to you by the User Contributed Perl Documentation crew. πŸ’– Encode::Detect is literally an Encode::Encoding subclass that detects the encoding of data. That’s the whole vibe. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

Here’s the tiny little invocation, no cap:

use Encode;
require Encode::Detect;
my $utf8 = decode("Detect", $data);

🌸 DESCRIPTION 🌸

This Perl module is an Encode::Encoding subclass, and it uses Encode::Detect::Detector to figure out the charset of the input data. Then it decodes that data using the encoder of the detected charset. Slay. ✨

It’s similar to Encode::Guess, but here’s the tea: it does not require you to configure a set of expected encodings. Like Encode::Guess, it only supports decoding β€” it cannot encode. Periodt. 🫢


πŸ’œ SEE ALSO πŸ’œ

  • Encode
  • Encode::Encoding
  • Encode::Detect::Detector

πŸ‘‘ AUTHOR πŸ‘‘

John Gardiner Myers <jgmyers@proofpoint.com> β€” iconic. 🌈


πŸŽ€ SUPPORT πŸŽ€

For help and thank you notes, e-mail the author directly. πŸ’Œ To report a bug, submit a patch, or add to the wishlist, please visit the CPAN bug manager at: http://rt.cpan.org


Cute sign-off bestie: this page is from perl v5.42.0, dated 2013-03-27, and it’s the Encode::Detect(3pm) manpage. Mwah πŸ’‹

πŸ“¦ where this page comes from