1 package Gitalist::Util;
3 use Sub::Exporter -setup => {
11 Gitalist::Util - Your usual catch all utility function package.
15 # decode sequences of octets in utf8 into Perl's internal form,
16 # which is utf-8 with utf8 flag set if needed. gitweb writes out
17 # in utf-8 thanks to "binmode STDOUT, ':utf8'" at beginning
20 if (utf8::valid($str)) {
24 return decode($fallback_encoding, $str, Encode::FB_DEFAULT);