line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#! /bin/false |
2
|
|
|
|
|
|
|
# vim: set autoindent shiftwidth=4 tabstop=4: |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# Interface to Encode. |
5
|
|
|
|
|
|
|
# Copyright (C) 2002-2017 Guido Flohr , |
6
|
|
|
|
|
|
|
# all rights reserved. |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# This program is free software: you can redistribute it and/or modify |
9
|
|
|
|
|
|
|
# it under the terms of the GNU General Public License as published by |
10
|
|
|
|
|
|
|
# the Free Software Foundation; either version 3 of the License, or |
11
|
|
|
|
|
|
|
# (at your option) any later version. |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# This program is distributed in the hope that it will be useful, |
14
|
|
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
15
|
|
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16
|
|
|
|
|
|
|
# GNU General Public License for more details. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License |
19
|
|
|
|
|
|
|
# along with this program. If not, see . |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
package Locale::RecodeData::_Encode; |
22
|
|
|
|
|
|
|
|
23
|
34
|
|
|
34
|
|
230
|
use strict; |
|
34
|
|
|
|
|
68
|
|
|
34
|
|
|
|
|
1082
|
|
24
|
34
|
|
|
34
|
|
184
|
use integer; |
|
34
|
|
|
|
|
79
|
|
|
34
|
|
|
|
|
230
|
|
25
|
|
|
|
|
|
|
|
26
|
34
|
|
|
34
|
|
736
|
use Encode; |
|
34
|
|
|
|
|
70
|
|
|
34
|
|
|
|
|
3298
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
require Locale::RecodeData; |
29
|
34
|
|
|
34
|
|
252
|
use base qw (Locale::RecodeData); |
|
34
|
|
|
|
|
81
|
|
|
34
|
|
|
|
|
17025
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub _recode |
32
|
|
|
|
|
|
|
{ |
33
|
34
|
|
|
34
|
|
240
|
use bytes; |
|
34
|
|
|
|
|
79
|
|
|
34
|
|
|
|
|
182
|
|
34
|
|
|
|
|
|
|
|
35
|
130543
|
|
|
130543
|
|
172483
|
my $retval; |
36
|
|
|
|
|
|
|
|
37
|
130543
|
100
|
|
|
|
259625
|
if ($_[0]->{_from} eq 'INTERNAL') { |
|
|
100
|
|
|
|
|
|
38
|
61304
|
|
|
|
|
77356
|
$_[1] = pack "N*", @{$_[1]}; |
|
61304
|
|
|
|
|
167016
|
|
39
|
61304
|
|
|
|
|
149342
|
$retval = Encode::from_to ($_[1], 'UTF-32BE', $_[0]->{_to}); |
40
|
|
|
|
|
|
|
} elsif ($_[0]->{_to} eq 'INTERNAL') { |
41
|
61243
|
|
|
|
|
117046
|
$retval = Encode::from_to ($_[1], $_[0]->{_from}, 'UTF-32BE'); |
42
|
61243
|
50
|
|
|
|
4001123
|
return unless defined $retval; |
43
|
61243
|
|
|
|
|
151458
|
$_[1] = [ unpack "N*", $_[1] ]; |
44
|
|
|
|
|
|
|
} else { |
45
|
7996
|
|
|
|
|
15606
|
$retval = Encode::from_to ($_[1], $_[0]->{_from}, $_[0]->{_to}); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
130543
|
50
|
|
|
|
4226397
|
return unless defined $retval; |
49
|
130543
|
|
|
|
|
240752
|
return 1; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__END__ |