File: utf8.init

package info (click to toggle)
texi2html 1.82%2Bdfsg1-5
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 34,700 kB
  • ctags: 16,893
  • sloc: perl: 15,902; xml: 6,075; sh: 3,977; makefile: 501
file content (49 lines) | stat: -rw-r--r-- 1,683 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# -*-perl-*-
#+##############################################################################
#
# utf8.init: convert accented letters to utf8
#
#    Copyright (C) 2003-2008  Patrice Dumas <dumas@centre-cired.fr>
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
#    02110-1301  USA
#
#-##############################################################################
$USE_ISO = 0;
$ENCODING_NAME = 'utf-8';

use Encode;
use Unicode::Normalize;

foreach my $key (keys(%unicode_accents), 'dotless')
{
    $style_map{$key}->{'function'} = \&t2h_utf8_accent;
    $style_map_texi{$key}->{'function'} = \&t2h_utf8_accent;
    $style_map_pre{$key}->{'function'} = \&t2h_utf8_accent;
}

foreach my $key (%things_map)
{
    if (exists($unicode_map{$key}) and ($unicode_map{$key} ne ''))
    {
        $things_map{$key} = chr(hex($unicode_map{$key}));
        $texi_map{$key} = chr(hex($unicode_map{$key}));
        $pre_map{$key} = chr(hex($unicode_map{$key}));
    }
}

$normal_text       = \&t2h_utf8_normal_text;

1;