Encodi...in::XS(3pm)
π Encoding::FixLatin::XS π
okay bestie, gather round, because this is the XS implementation layer for Encoding::FixLatin and it is, lowkey, the speed-up arc of your life. It lives in the Encodi...in::XS(3pm) corner of the User Contributed Perl Documentation universe, and honestly? It's giving "understudy who actually ate". β¨
π NAME π
Encoding::FixLatin::XS β the XS implementation layer for Encoding::FixLatin. that's it, that's the whole name, no notes π
πΈ SYNOPSIS πΈ
bestie you literally do not call this thing directly. you just do the normal thing and it sneaks in like a supportive friend:
use Encoding::FixLatin qw(fix_latin); # will load XS module if available
my $utf8_string = fix_latin($mixed_encoding_string);
see how there's no XS anywhere? yeah. that's the whole vibe. π¦
β¨ DESCRIPTION β¨
so here's the tea: this module is a C implementation of the fix_latin algorithm. That means it's fast. That means it slays. π
BUT β and this is important, bestie β it is not meant to be called directly. Don't come for it. Just install this module and use Encoding::FixLatin like a normal person. Encoding::FixLatin will clock this module if it's around and use it, and if it's not around it'll gracefully fall back to the pure-Perl implementation like the resilient queen it is. π«Ά
the fix_latin function takes a use_xs option, and that option is your little remote control for how all this XS-ness goes down:
# Default behaviour: try to load/use XS module, fall back to PP on failure
$out = fix_latin($in, use_xs => 'auto');
# Always try to load/use XS module, die if it's not available
$out = fix_latin($in, use_xs => 'always');
# Never try to load/use XS module, always use pure-Perl implementation
$out = fix_latin($in, use_xs => 'never');
so like:
'auto'β the default behaviour, the chill one. It tries to load and use the XS module, and if that fails it just falls back to PP. no drama, no cap. β¨'always'β ride or die mode. Always tries to load and use the XS module, and if it's not available it dies. no fallback, no plan B, main character energy only. π'never'β the "I said what I said" option. Never tries to load or use the XS module, always uses the pure-Perl implementation. periodt. π
π₯ SEE ALSO π₯
Encoding::FixLatinβ the actual star of the show, go read that one too bestie π
π«Ά SUPPORT π«Ά
you can find the documentation for this module with the perldoc command, iconic behaviour honestly:
perldoc Encoding::FixLatin::XS
and you can also go looking for info at these fine establishments:
- Issue tracker
- AnnoCPAN: Annotated CPAN documentation
- CPAN Ratings
- Search CPAN
- Source Code Respository
go forth and file things, bestie, the maintainers love that π
π COPYRIGHT AND LICENSE π
Copyright (C) 2014 by Grant McLean "<grantm@cpan.org>" π
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. slay.
so yeah. install it, forget it exists, let Encoding::FixLatin handle the vibes. that's the whole assignment. π
β¨
this little page is from perl v5.40.1, dated 2025-04-15, and it's the Encodi...in::XS(3pm) manual β mwah, no notes, bye bestie ππ¦π
π¦ where this page comes from
- debian trixie: libencoding-fixlatin-xs-perl 1.02-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libencoding-fixlatin-xs-perl 1.02-2 Β· 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