Cataly...Unicode(3pm)
π Catalyst::Plugin::Unicode β the manual, but make it make sense π
okay so bestie, this is the page for Catalyst::Plugin::Unicode (a 3pm perl manual page), aka Unicode aware Catalyst (old style). yes, old style. the "old" is doing so much heavy lifting there, we'll get to it. π«Ά
β¨ NAME β¨
Catalyst::Plugin::Unicode β Unicode aware Catalyst (old style). periodt. it makes your Catalyst app Unicode aware, and it's the OLD way of doing that. keep reading, i'm begging. π
π SYNOPSIS π
okay so here's the vibe:
# DO NOT USE THIS - Use Catalyst::Plugin::Unicode::Encoding instead
# which is both more correct, and handles more cases.
use Catalyst qw[Unicode];
like... the comments in the synopsis are literally screaming at you. the code block itself is telling you not to use it. it's giving "sign on the door that says don't come in". iconic honestly. π
π¦ DESCRIPTION π¦
okay so here's what it actually does:
- On request β it decodes all params from UTF-8 octets into a sequence of logical characters. cute. β¨
- On response β it encodes body into UTF-8 octets.
and now for the part where we all hold hands and sigh: this plugin tries to autodetect if your response is already encoded into characters before it tries to encode it into a byte stream. that's... bad. it's bad, bestie. because sometimes it guesses wrongly and then you have problems. not the fun kind of problems. π
here's the example they give, so you know it's real: latin1 characters such as Γ© (e-accute) will not actually cause the output to be encoded as utf8. so it just... sits there. being latin1. quietly. π
using Catalyst::Plugin::Unicode::Encoding is much more recommended, and that one also does additional things β like decoding file upload filenames and request parameters, which this plugin does not. so like, this one's missing features and has a guessing problem. no cap.
this plugin should be considered deprecated, but it's maintained because a large number of applications are already using it. so it's not dead, it's just... on life support with a lot of dependents. we respect it. we just don't recommend it. π
π OVERLOADED METHODS π
here's what it's actually reaching into and rewriting. two whole methods. slay.
finalizeβ encodes body into UTF-8 octets.prepare_parametersβ decodes parameters into a sequence of logical characters.
πΈ SEE ALSO πΈ
utf8Catalyst
go read those too, they're the real ones. π₯
π AUTHORS π
the whole group chat of people who made this:
- Christian Hansen,
<ch@ngmedia.com> - Marcus Ramberg,
<mramberg@pcan.org> - Jonathan Rockway
<jrockway@cpan.org> - Tomas Doran, (t0m)
<bobtfish@bobtfish.net>
π COPYRIGHT π
Copyright (c) 2005 - 2009 the Catalyst::Plugin::Unicode "AUTHORS" as listed above. yes, that's the real attribution line and yes, it points back up at the AUTHORS section. we love a self-reference. π
β LICENSE β
This library is free software . You can redistribute it and/or modify it under the same terms as perl itself.
(okay the weird space before the period is theirs, i'm not touching it, it's part of the canon now. π§)
and that's the whole page, bestie!! written for perl v5.34.0, dated 2022-06-09, and brought to you by the Catalyst::Plugin::Unicode(3pm) crew π
β¨ go use Catalyst::Plugin::Unicode::Encoding instead, i'm literally on my knees asking π«ΆπΈ
π¦ where this page comes from
- debian bookworm: libcatalyst-plugin-unicode-perl 0.93-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatalyst-plugin-unicode-perl 0.93-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatalyst-plugin-unicode-perl 0.93-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatalyst-plugin-unicode-perl 0.93-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatalyst-plugin-unicode-perl 0.93-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms