We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3f77a6 commit 9020a40Copy full SHA for 9020a40
demo.pl
@@ -69,3 +69,15 @@ sub version {
69
exit;
70
}
71
72
+# workaround for functions that don't cope with utf8 well
73
+sub to_utf8($) {
74
+ my ($str) = @_;
75
+ utf8::decode($str) unless utf8::is_utf8($str);
76
+ return $str;
77
+}
78
+sub readlink_utf8($) {
79
+ my ($filename) = @_;
80
+ return to_utf8(readlink($filename));
81
82
+sub realpath($) { return to_utf8(Cwd::realpath(@_)); }
83
+sub bsd_glob($) { return map {to_utf8($_)} File::Glob::bsd_glob(@_); }
0 commit comments