Templa...Decode(3pm)
π Template::Plugin::UTF8Decode(3pm) π
okay bestie, so this is Template::Plugin::UTF8Decode β a UTF8 decoder filter for Template Toolkit. it's chillin' in the User Contributed Perl Documentation section, and no cap, it's a tiny lil legend. π¦
β¨ NAME β¨
Template::Plugin::UTF8Decode β a UTF8 decoder filter for Template Toolkit. it's giving "small module, big rescue energy". π
πΈ SYNOPSIS πΈ
here's the vibe, copy-paste ready:
[% USE UTF8Decode %]
[% ansi_string_var | utf8_decode | html_entity %]
like, you USE the plugin, then you pipe your string through utf8_decode and keep going with whatever else you need (yes, html_entity said hi). π
π«Ά DESCRIPTION π«Ά
so this module is a Template Toolkit filter, and what it does is decode a string to utf8. that's it, that's the whole job, and it eats every single time. β¨
for example β and this is the real-world tea β if you're using FreeTDS (http://www.freetds.org) to talk with ms sql, it can hand you back an utf8 string as byte char. and then you're just sitting there like π because it looks cursed. this filter is the fix, bestie. π
π METHODS π
π init
installs the filter as utf8_decode. that's the name you'll be piping things into, periodt. β¨
π filter
receives a reference to the plugin object, along with the text to be filtered. that's the whole handshake β object ref + your text, in it goes. π
π AUTHOR π
Fabio Masini <fabio.masini@gmail.com>
π COPYRIGHT AND LICENSE π
Copyright (C) 2009 Fabio Masini
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
so like, go wild, remix it, redistribute it β same terms as Perl itself, that's the deal. π
and that's the whole page, bestie!! π¦β¨ this doc came from perl v5.32.0, dated 2021-01-08, and honestly? iconic. go decode something. π πΈ
π¦ where this page comes from
- debian bookworm: libtemplate-plugin-utf8decode-perl 0.01-1.1
- debian trixie: libtemplate-plugin-utf8decode-perl 0.01-1.1
- ubuntu jammy: libtemplate-plugin-utf8decode-perl 0.01-1.1
- ubuntu noble: libtemplate-plugin-utf8decode-perl 0.01-1.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms