summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/site/lib/auto/Tk/getEncoding.al
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-04-05 22:27:26 +0000
committerKarl Berry <karl@freefriends.org>2016-04-05 22:27:26 +0000
commitb56b320b5e2515160073fa1b469514002688fe11 (patch)
tree965a7100c5e45fca8ec803d22b8b6ce14fca4633 /Master/tlpkg/tlperl/site/lib/auto/Tk/getEncoding.al
parentd26c206452d2e285c3bbf949f34011e4a55fd8f9 (diff)
tlperl 5.22.1 from siep
git-svn-id: svn://tug.org/texlive/trunk@40252 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/site/lib/auto/Tk/getEncoding.al')
-rw-r--r--Master/tlpkg/tlperl/site/lib/auto/Tk/getEncoding.al43
1 files changed, 43 insertions, 0 deletions
diff --git a/Master/tlpkg/tlperl/site/lib/auto/Tk/getEncoding.al b/Master/tlpkg/tlperl/site/lib/auto/Tk/getEncoding.al
new file mode 100644
index 00000000000..4af0e51bfb1
--- /dev/null
+++ b/Master/tlpkg/tlperl/site/lib/auto/Tk/getEncoding.al
@@ -0,0 +1,43 @@
+# NOTE: Derived from blib\lib\Tk.pm.
+# Changes made here will be lost when autosplit is run again.
+# See AutoSplit.pm.
+package Tk;
+
+#line 821 "blib\lib\Tk.pm (autosplit into blib\lib\auto\Tk\getEncoding.al)"
+sub getEncoding
+{
+ my ($class,$name) = @_;
+ eval { require Encode };
+ if ($@)
+ {
+ require Tk::DummyEncode;
+ return Tk::DummyEncode->getEncoding($name);
+ }
+ $name = $Tk::font_encoding{$name} if exists $Tk::font_encoding{$name};
+ my $enc = Encode::find_encoding($name);
+
+ unless ($enc)
+ {
+ $enc = Encode::find_encoding($name) if ($name =~ s/[-_]\d+$//)
+ }
+# if ($enc)
+# {
+# print STDERR "Lookup '$name' => ".$enc->name."\n";
+# }
+# else
+# {
+# print STDERR "Failed '$name'\n";
+# }
+ unless ($enc)
+ {
+ if ($name eq 'X11ControlChars')
+ {
+ require Tk::DummyEncode;
+ $Encode::encoding{$name} = $enc = Tk::DummyEncode->getEncoding($name);
+ }
+ }
+ return $enc;
+}
+
+1;
+# end of Tk::getEncoding