185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho#!/usr/bin/perl
264339d36f8bd4db5025fe2988eda22b491a9219cFredrik Roubert# Copyright (C) 2016 and later: Unicode, Inc. and others.
364339d36f8bd4db5025fe2988eda22b491a9219cFredrik Roubert# License & terms of use: http://www.unicode.org/copyright.html
41b7d32f919554dda9c193b32188251337bc756f1Fredrik Roubert# Copyright (c) 2001-2015 International Business Machines
5ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru# Corporation and others. All Rights Reserved.
6ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
7ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru####################################################################################
8ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru# filterRFC3454.pl:
9ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru# This tool filters the RFC-3454 txt file for StringPrep tables and creates a table
10ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru# to be used in NamePrepProfile
11ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#
12ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru# Author: Ram Viswanadha
13ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#
14ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru####################################################################################
15ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
16ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruuse File::Find;
17ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruuse File::Basename;
18ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruuse IO::File;
19ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruuse Cwd;
20ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruuse File::Copy;
21ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruuse Getopt::Long;
22ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruuse File::Path;
23ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruuse File::Copy;
2485bf2e2fbc60a9f938064abc8127d61da7d19882Claire House Time::localtime;
25ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
2685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho$icu_copyright = "#####################################################################\n# Copyright (c) %d, International Business Machines Corporation and\n# others. All Rights Reserved.\n#####################################################################\n\n";
2785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho$copyright = "###################\n# This file was generated from RFC 3454 (http://www.ietf.org/rfc/rfc3454.txt)\n# Copyright (C) The Internet Society (2002).  All Rights Reserved. \n###################\n\n";
2885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho$warning = "###################\n# WARNING: This table is generated by filterRFC3454.pl tool with\n# options: @ARGV \n###################\n\n";
29ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#run the program)
30ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Querumain();
31ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
32ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#---------------------------------------------------------------------
33ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru# The main program
34ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
35ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Querusub main(){
36ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  GetOptions(
37ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           "--sourcedir=s" => \$sourceDir,
38ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           "--destdir=s" => \$destDir,
39ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           "--src-filename=s" => \$srcFileName,
40ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           "--dest-filename=s" => \$destFileName,
41ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           "--A1"  => \$a1,
42ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           "--B1"  => \$b1,
43ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           "--B2"  => \$b2,
4485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho           "--B3"  => \$b3,
45ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           "--C11" => \$c11,
46ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           "--C12" => \$c12,
47ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           "--C21" => \$c21,
48ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           "--C22" => \$c22,
49ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           "--C3"  => \$c3,
50ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           "--C4"  => \$c4,
51ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           "--C5"  => \$c5,
52ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           "--C6"  => \$c6,
53ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           "--C7"  => \$c7,
54ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           "--C8"  => \$c8,
55ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           "--C9"  => \$c9,
5685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho           "--iscsi" => \$writeISCSIProhibitedExtra,
5785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho           "--xmpp-node" => \$writeXMPPNodeProhibitedExtra,
5885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho           "--sasl" => \$writeSASLMap,
5985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho           "--ldap" => \$writeLDAPMap,
6085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho           "--normalize" => \$norm,
6185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho           "--check-bidi" => \$checkBidi,
62ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           );
63ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  usage() unless defined $sourceDir;
64ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  usage() unless defined $destDir;
65ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  usage() unless defined $srcFileName;
66ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  usage() unless defined $destFileName;
67ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
68ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  $infile = $sourceDir."/".$srcFileName;
69ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  $inFH = IO::File->new($infile,"r")
70ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            or die  "could not open the file $infile for reading: $! \n";
71ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  $outfile = $destDir."/".$destFileName;
72ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
73ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  unlink($outfile);
74ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  $outFH = IO::File->new($outfile,"a")
75ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            or die  "could not open the file $outfile for writing: $! \n";
7685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho
7785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho  printf $outFH  $icu_copyright, localtime->year()+1900;
78ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  print $outFH  $copyright;
79ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  print $outFH  $warning;
8085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho
8185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho  if(defined $norm) {
8285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho      print $outFH "\@normalize;;\n";
8385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho  }
8485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho  if(defined $checkBidi) {
8585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho      print $outFH "\@check-bidi;;\n";
8685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho  }
8785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho  print $outFH "\n";
88ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  close($outFH);
89ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
90ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  if(defined $b2 && defined $b3){
91ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      die "ERROR: --B2 and --B3 are both specified\!\n";
92ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  }
93ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
94ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  while(defined ($line=<$inFH>)){
95ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      next unless $line=~ /Start\sTable/;
96ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      if($line =~ /A.1/){
97ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            createUnassignedTable($inFH,$outfile);
98ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      }
99ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      if($line =~ /B.1/ && defined $b1){
100ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            createMapToNothing($inFH,$outfile);
101ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      }
102ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      if($line =~ /B.2/ && defined $b2){
103ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            createCaseMapNorm($inFH,$outfile);
104ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      }
105ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      if($line =~ /B.3/ && defined $b3){
106ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            createCaseMapNoNorm($inFH,$outfile);
107ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      }
108ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      if($line =~ /C.1.1/ && defined $c11 ){
109ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            createProhibitedTable($inFH,$outfile,$line);
110ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      }
111ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      if($line =~ /C.1.2/ && defined $c12 ){
112ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            createProhibitedTable($inFH,$outfile,$line);
113ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      }
114ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      if($line =~ /C.2.1/ && defined $c21 ){
115ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            createProhibitedTable($inFH,$outfile,$line);
116ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      }
117ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      if($line =~ /C.2.2/ && defined $c22 ){
118ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            createProhibitedTable($inFH,$outfile,$line);
119ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      }
120ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      if($line =~ /C.3/ && defined $c3 ){
121ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            createProhibitedTable($inFH,$outfile,$line);
122ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      }
123ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      if($line =~ /C.4/ && defined $c4 ){
124ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            createProhibitedTable($inFH,$outfile,$line);
125ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      }
126ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      if($line =~ /C.5/ && defined $c5 ){
127ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            createProhibitedTable($inFH,$outfile,$line);
128ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      }
129ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      if($line =~ /C.6/ && defined $c6 ){
130ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            createProhibitedTable($inFH,$outfile,$line);
131ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      }
132ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      if($line =~ /C.7/ && defined $c7 ){
133ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            createProhibitedTable($inFH,$outfile,$line);
134ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      }
135ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      if($line =~ /C.8/ && defined $c8 ){
136ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            createProhibitedTable($inFH,$outfile,$line);
137ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      }
138ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      if($line =~ /C.9/ && defined $c9 ){
139ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            createProhibitedTable($inFH,$outfile,$line);
140ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      }
141ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  }
14285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho  if( defined $writeISCSIProhibitedExtra){
143ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru      create_iSCSIExtraProhibitedTable($inFH, $outfile);
144ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  }
1451b7d32f919554dda9c193b32188251337bc756f1Fredrik Roubert  if( defined $writeXMPPNodeProhibitedExtra){
14685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho      create_XMPPNodeExtraProhibitedTable($inFH, $outfile);
14785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho  }
14885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho  if( defined $writeSASLMap){
14985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho      create_SASLMapTable($inFH, $outfile);
15085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho  }
15185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho  if( defined $writeLDAPMap){
15285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho      create_LDAPMapTable($inFH, $outfile);
15385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho  }
154ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  close($inFH);
155ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}
156ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
157ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#-----------------------------------------------------------------------
158ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Querusub readPrint{
159ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    local ($inFH, $outFH,$comment, $table) = @_;
160ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    $count = 0;
161ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    print $outFH $comment."\n";
162ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    while(defined ($line = <$inFH>)){
163ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        next if $line =~ /Hoffman\s\&\sBlanchet/;  # ignore heading
164ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        next if $line =~ /RFC\s3454/; # ignore heading
165ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        next if $line =~ /\f/;  # ignore form feed
166ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        next if $line eq "\n";  # ignore blank lines
167ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        # break if "End Table" is found
168ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        if( $line =~ /End\sTable/){
169ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            print $outFH "\n# Total code points $count\n\n";
170ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            return;
171ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        }
172ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        if($print==1){
173ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            print $line;
174ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        }
175ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        $line =~ s/-/../;
176ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        $line =~ s/^\s+//;
177ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        if($line =~ /\;/){
178ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        }else{
179ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            $line =~ s/$/;/;
180ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        }
181ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        if($table =~ /A/ ){
182ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            ($code, $noise) = split /;/ , $line;
183ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            $line = $code."; ; UNASSIGNED\n";
184ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        }elsif ( $table =~ /B\.1/ ){
185ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            $line =~ s/Map to nothing/MAP/;
186ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        }elsif ( $table =~ /B\.[23]/ ){
187ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            $line =~ s/Case map/MAP/;
188ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            $line =~ s/Additional folding/MAP/;
189ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        }elsif ( $table =~ /C/ ) {
190ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            ($code, $noise) = split /;/ , $line;
191ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            $line = $code."; ; PROHIBITED\n";
192ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        }
193ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        if($line =~ /\.\./){
194ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            ($code, $noise) = split /;/ , $line;
195ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            ($startStr, $endStr ) = split /\.\./, $code;
196ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            $start = atoi($startStr);
197ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            $end   = atoi($endStr);
198ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            #print $start."     ".$end."\n";
199ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            while($start <= $end){
200ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru                $count++;
201ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru                $start++;
202ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            }
203ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        }else{
204ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru              $count++;
205ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        }
206ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        print $outFH $line;
207ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    }
208ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}
209ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#-----------------------------------------------------------------------
210ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Querusub atoi {
211ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    my $t;
212ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    foreach my $d (split(//, shift())) {
213ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        $t = $t * 16 + $d;
214ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    }
215ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    return $t;
216ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}
217ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#-----------------------------------------------------------------------
218ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Querusub createUnassignedTable{
219ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    ($inFH,$outfile) = @_;
220ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    $outFH = IO::File->new($outfile,"a")
221ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            or die  "could not open the file $outfile for writing: $! \n";
222ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    $comment = "# This table contains code points from Table A.1 from RFC 3454\n";
223ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    readPrint($inFH,$outFH, $comment, "A");
224ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    close($outFH);
225ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}
226ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#-----------------------------------------------------------------------
227ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Querusub createMapToNothing{
228ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    ($inFH,$outfile) = @_;
229ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    $outFH = IO::File->new($outfile,"a")
230ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            or die  "could not open the file $outfile for writing: $! \n";
231ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    $comment = "# This table contains code points from Table B.1 from RFC 3454\n";
232ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    readPrint($inFH,$outFH,$comment, "B.1");
233ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    close($outFH);
234ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}
235ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#-----------------------------------------------------------------------
236ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Querusub createCaseMapNorm{
237ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    ($inFH,$outfile) = @_;
238ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    $outFH = IO::File->new($outfile,"a")
239ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            or die  "could not open the file $outfile for writing: $! \n";
240ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    $comment = $warning."# This table contains code points from Table B.2 from RFC 3454\n";
241ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    readPrint($inFH,$outFH,$comment, "B.2");
242ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    close($outFH);
243ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}
244ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#-----------------------------------------------------------------------
245ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Querusub createCaseMapNoNorm{
246ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    ($inFH,$outfile) = @_;
247ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    $outFH = IO::File->new($outfile,"a")
248ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            or die  "could not open the file $outfile for writing: $! \n";
249ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    $comment = $warning."# This table contains code points from Table B.3 from RFC 3454\n";
250ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    readPrint($inFH,$outFH,$comment, "B.3");
251ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    close($outFH);
252ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}
253ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#-----------------------------------------------------------------------
254ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Querusub createProhibitedTable{
255ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    ($inFH,$outfile,$line) = @_;
256ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    $line =~ s/Start//;
257ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    $line =~ s/-//g;
258ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    $comment = "# code points from $line";
259ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
260ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    $outFH = IO::File->new($outfile, "a")
261ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            or die  "could not open the file $outfile for writing: $! \n";
262ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    readPrint($inFH,$outFH,$comment, "C");
263ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    close($outFH);
264ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}
265ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
266ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#-----------------------------------------------------------------------
267ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Querusub create_iSCSIExtraProhibitedTable{
268ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    ($inFH,$outfile,$line) = @_;
26985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    $comment ="# Additional prohibitions from iSCSI profile (rfc3722.txt)\n\n";
270ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
271ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    $outFH = IO::File->new($outfile, "a")
272ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            or die  "could not open the file $outfile for writing: $! \n";
273ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    print $outFH $comment;
274ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    print $outFH "0021..002C; ; PROHIBITED\n";
275ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    print $outFH "002F; ; PROHIBITED\n";
276ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    print $outFH "003B..0040; ; PROHIBITED\n";
277ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    print $outFH "005B..0060; ; PROHIBITED\n";
278ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    print $outFH "007B..007E; ; PROHIBITED\n";
279ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    print $outFH "3002; ; PROHIBITED\n";
280ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    print $outFH "\n# Total code points 30\n";
281ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    close($outFH);
282ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}
283ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#-----------------------------------------------------------------------
28485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Hosub create_XMPPNodeExtraProhibitedTable{
28585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    ($inFH,$outfile,$line) = @_;
28685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    $comment ="# Additional prohibitions from XMPP Nodeprep profile (rfc3920.txt)\n\n";
28785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho
28885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    $outFH = IO::File->new($outfile, "a")
28985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho            or die  "could not open the file $outfile for writing: $! \n";
29085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH $comment;
29185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0022; ; PROHIBITED\n";
29285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0026; ; PROHIBITED\n";
29385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0027; ; PROHIBITED\n";
29485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "002F; ; PROHIBITED\n";
29585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "003A; ; PROHIBITED\n";
29685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "003C; ; PROHIBITED\n";
29785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "003E; ; PROHIBITED\n";
29885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0040; ; PROHIBITED\n";
29985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "\n# Total code points 8\n";
30085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    close($outFH);
30185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho}
30285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho#-----------------------------------------------------------------------
30385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Hosub create_SASLMapTable{
30485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    ($inFH,$outfile,$line) = @_;
30585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    $comment ="# Map table for SASL profile (rfc4013.txt)\n\n";
30685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho
30785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    $outFH = IO::File->new($outfile, "a")
30885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho            or die  "could not open the file $outfile for writing: $! \n";
30985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH $comment;
31085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    # non-ASCII space characters [C.1.2] to SPACE
31185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "00A0; 0020; MAP\n";
31285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "1680; 0020; MAP\n";
31385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2000; 0020; MAP\n";
31485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2001; 0020; MAP\n";
31585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2002; 0020; MAP\n";
31685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2003; 0020; MAP\n";
31785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2004; 0020; MAP\n";
31885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2005; 0020; MAP\n";
31985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2006; 0020; MAP\n";
32085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2007; 0020; MAP\n";
32185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2008; 0020; MAP\n";
32285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2009; 0020; MAP\n";
32385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "200A; 0020; MAP\n";
32485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "200B; 0020; MAP\n";
32585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "202F; 0020; MAP\n";
32685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "205F; 0020; MAP\n";
32785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "3000; 0020; MAP\n";
32885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho
32985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    # commonly mapped to nothing characters except U+200B to nothing
33085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "00AD; ; MAP\n";
33185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "034F; ; MAP\n";
33285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "1806; ; MAP\n";
33385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "180B; ; MAP\n";
33485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "180C; ; MAP\n";
33585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "180D; ; MAP\n";
33685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "200C; ; MAP\n";
33785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "200D; ; MAP\n";
33885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2060; ; MAP\n";
33985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE00; ; MAP\n";
34085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE01; ; MAP\n";
34185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE02; ; MAP\n";
34285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE03; ; MAP\n";
34385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE04; ; MAP\n";
34485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE05; ; MAP\n";
34585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE06; ; MAP\n";
34685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE07; ; MAP\n";
34785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE08; ; MAP\n";
34885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE09; ; MAP\n";
34985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE0A; ; MAP\n";
35085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE0B; ; MAP\n";
35185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE0C; ; MAP\n";
35285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE0D; ; MAP\n";
35385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE0E; ; MAP\n";
35485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE0F; ; MAP\n";
35585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FEFF; ; MAP\n";
35685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "\n# Total code points 43\n";
35785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    close($outFH);
35885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho}
35985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho#-----------------------------------------------------------------------
36085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Hosub create_LDAPMapTable{
36185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    ($inFH,$outfile,$line) = @_;
36285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    $comment ="# Map table for LDAP profile (rfc4518.txt)\n\n";
36385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho
36485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    $outFH = IO::File->new($outfile, "a")
36585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho            or die  "could not open the file $outfile for writing: $! \n";
36685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH $comment;
36785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho
36885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    #   SOFT HYPHEN (U+00AD) and MONGOLIAN TODO SOFT HYPHEN (U+1806) code
36985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    #   points are mapped to nothing.  COMBINING GRAPHEME JOINER (U+034F) and
37085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    #   VARIATION SELECTORs (U+180B-180D, FF00-FE0F) code points are also
37185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    #   mapped to nothing.  The OBJECT REPLACEMENT CHARACTER (U+FFFC) is
37285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    #   mapped to nothing.
37385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho
37485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "00AD; ; MAP\n";
37585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "034F; ; MAP\n";
37685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "1806; ; MAP\n";
37785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "180B; ; MAP\n";
37885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "180C; ; MAP\n";
37985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "180D; ; MAP\n";
38085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE00; ; MAP\n";
38185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE01; ; MAP\n";
38285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE02; ; MAP\n";
38385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE03; ; MAP\n";
38485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE04; ; MAP\n";
38585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE05; ; MAP\n";
38685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE06; ; MAP\n";
38785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE07; ; MAP\n";
38885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE08; ; MAP\n";
38985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE09; ; MAP\n";
39085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE0A; ; MAP\n";
39185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE0B; ; MAP\n";
39285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE0C; ; MAP\n";
39385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE0D; ; MAP\n";
39485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE0E; ; MAP\n";
39585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FE0F; ; MAP\n";
39685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FFFC; ; MAP\n";
39785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho
39885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho#   CHARACTER TABULATION (U+0009), LINE FEED (LF) (U+000A), LINE
39985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho#   TABULATION (U+000B), FORM FEED (FF) (U+000C), CARRIAGE RETURN (CR)
40085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho#   (U+000D), and NEXT LINE (NEL) (U+0085) are mapped to SPACE (U+0020).
40185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho
40285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0009; 0020; MAP\n";
40385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "000A; 0020; MAP\n";
40485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "000B; 0020; MAP\n";
40585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "000C; 0020; MAP\n";
40685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "000D; 0020; MAP\n";
40785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0085; 0020; MAP\n";
40885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho
40985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    #   All other control code (e.g., Cc) points or code points with a
41085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    #   control function (e.g., Cf) are mapped to nothing.  The following is
41185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    #   a complete list of these code points: U+0000-0008, 000E-001F, 007F-
41285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    #   0084, 0086-009F, 06DD, 070F, 180E, 200C-200F, 202A-202E, 2060-2063,
41385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    #   206A-206F, FEFF, FFF9-FFFB, 1D173-1D17A, E0001, E0020-E007F.
41485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho
41585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0000; ; MAP\n";
41685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0001; ; MAP\n";
41785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0002; ; MAP\n";
41885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0003; ; MAP\n";
41985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0004; ; MAP\n";
42085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0005; ; MAP\n";
42185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0006; ; MAP\n";
42285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0007; ; MAP\n";
42385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0008; ; MAP\n";
42485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "000E; ; MAP\n";
42585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "000F; ; MAP\n";
42685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0010; ; MAP\n";
42785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0011; ; MAP\n";
42885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0012; ; MAP\n";
42985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0013; ; MAP\n";
43085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0014; ; MAP\n";
43185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0015; ; MAP\n";
43285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0016; ; MAP\n";
43385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0017; ; MAP\n";
43485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0018; ; MAP\n";
43585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0019; ; MAP\n";
43685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "001A; ; MAP\n";
43785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "001B; ; MAP\n";
43885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "001C; ; MAP\n";
43985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "001D; ; MAP\n";
44085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "001E; ; MAP\n";
44185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "001F; ; MAP\n";
44285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "007F; ; MAP\n";
44385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0080; ; MAP\n";
44485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0081; ; MAP\n";
44585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0082; ; MAP\n";
44685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0083; ; MAP\n";
44785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0084; ; MAP\n";
44885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0086; ; MAP\n";
44985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0087; ; MAP\n";
45085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0088; ; MAP\n";
45185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0089; ; MAP\n";
45285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "008A; ; MAP\n";
45385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "008B; ; MAP\n";
45485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "008C; ; MAP\n";
45585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "008D; ; MAP\n";
45685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "008E; ; MAP\n";
45785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "008F; ; MAP\n";
45885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0090; ; MAP\n";
45985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0091; ; MAP\n";
46085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0092; ; MAP\n";
46185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0093; ; MAP\n";
46285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0094; ; MAP\n";
46385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0095; ; MAP\n";
46485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0096; ; MAP\n";
46585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0097; ; MAP\n";
46685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0098; ; MAP\n";
46785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "0099; ; MAP\n";
46885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "009A; ; MAP\n";
46985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "009B; ; MAP\n";
47085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "009C; ; MAP\n";
47185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "009D; ; MAP\n";
47285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "009E; ; MAP\n";
47385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "009F; ; MAP\n";
47485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "06DD; ; MAP\n";
47585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "070F; ; MAP\n";
47685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "180E; ; MAP\n";
47785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "200C; ; MAP\n";
47885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "200D; ; MAP\n";
47985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "200E; ; MAP\n";
48085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "200F; ; MAP\n";
48185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "202A; ; MAP\n";
48285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "202B; ; MAP\n";
48385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "202C; ; MAP\n";
48485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "202D; ; MAP\n";
48585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "202E; ; MAP\n";
48685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2060; ; MAP\n";
48785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2061; ; MAP\n";
48885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2062; ; MAP\n";
48985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2063; ; MAP\n";
49085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "206A; ; MAP\n";
49185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "206B; ; MAP\n";
49285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "206C; ; MAP\n";
49385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "206D; ; MAP\n";
49485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "206E; ; MAP\n";
49585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "206F; ; MAP\n";
49685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FEFF; ; MAP\n";
49785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FFF9; ; MAP\n";
49885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FFFA; ; MAP\n";
49985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "FFFB; ; MAP\n";
50085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "1D173; ; MAP\n";
50185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "1D174; ; MAP\n";
50285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "1D175; ; MAP\n";
50385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "1D176; ; MAP\n";
50485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "1D177; ; MAP\n";
50585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "1D178; ; MAP\n";
50685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "1D179; ; MAP\n";
50785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "1D17A; ; MAP\n";
50885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0001; ; MAP\n";
50985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0020; ; MAP\n";
51085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0021; ; MAP\n";
51185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0022; ; MAP\n";
51285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0023; ; MAP\n";
51385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0024; ; MAP\n";
51485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0025; ; MAP\n";
51585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0026; ; MAP\n";
51685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0027; ; MAP\n";
51785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0028; ; MAP\n";
51885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0029; ; MAP\n";
51985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E002A; ; MAP\n";
52085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E002B; ; MAP\n";
52185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E002C; ; MAP\n";
52285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E002D; ; MAP\n";
52385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E002E; ; MAP\n";
52485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E002F; ; MAP\n";
52585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0030; ; MAP\n";
52685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0031; ; MAP\n";
52785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0032; ; MAP\n";
52885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0033; ; MAP\n";
52985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0034; ; MAP\n";
53085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0035; ; MAP\n";
53185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0036; ; MAP\n";
53285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0037; ; MAP\n";
53385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0038; ; MAP\n";
53485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0039; ; MAP\n";
53585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E003A; ; MAP\n";
53685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E003B; ; MAP\n";
53785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E003C; ; MAP\n";
53885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E003D; ; MAP\n";
53985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E003E; ; MAP\n";
54085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E003F; ; MAP\n";
54185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0040; ; MAP\n";
54285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0041; ; MAP\n";
54385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0042; ; MAP\n";
54485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0043; ; MAP\n";
54585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0044; ; MAP\n";
54685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0045; ; MAP\n";
54785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0046; ; MAP\n";
54885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0047; ; MAP\n";
54985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0048; ; MAP\n";
55085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0049; ; MAP\n";
55185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E004A; ; MAP\n";
55285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E004B; ; MAP\n";
55385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E004C; ; MAP\n";
55485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E004D; ; MAP\n";
55585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E004E; ; MAP\n";
55685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E004F; ; MAP\n";
55785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0050; ; MAP\n";
55885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0051; ; MAP\n";
55985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0052; ; MAP\n";
56085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0053; ; MAP\n";
56185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0054; ; MAP\n";
56285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0055; ; MAP\n";
56385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0056; ; MAP\n";
56485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0057; ; MAP\n";
56585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0058; ; MAP\n";
56685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0059; ; MAP\n";
56785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E005A; ; MAP\n";
56885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E005B; ; MAP\n";
56985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E005C; ; MAP\n";
57085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E005D; ; MAP\n";
57185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E005E; ; MAP\n";
57285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E005F; ; MAP\n";
57385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0060; ; MAP\n";
57485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0061; ; MAP\n";
57585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0062; ; MAP\n";
57685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0063; ; MAP\n";
57785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0064; ; MAP\n";
57885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0065; ; MAP\n";
57985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0066; ; MAP\n";
58085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0067; ; MAP\n";
58185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0068; ; MAP\n";
58285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0069; ; MAP\n";
58385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E006A; ; MAP\n";
58485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E006B; ; MAP\n";
58585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E006C; ; MAP\n";
58685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E006D; ; MAP\n";
58785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E006E; ; MAP\n";
58885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E006F; ; MAP\n";
58985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0070; ; MAP\n";
59085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0071; ; MAP\n";
59185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0072; ; MAP\n";
59285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0073; ; MAP\n";
59385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0074; ; MAP\n";
59485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0075; ; MAP\n";
59585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0076; ; MAP\n";
59685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0077; ; MAP\n";
59785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0078; ; MAP\n";
59885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E0079; ; MAP\n";
59985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E007A; ; MAP\n";
60085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E007B; ; MAP\n";
60185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E007C; ; MAP\n";
60285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E007D; ; MAP\n";
60385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E007E; ; MAP\n";
60485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "E007F; ; MAP\n";
60585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho
60685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    #   ZERO WIDTH SPACE (U+200B) is mapped to nothing.  All other code
60785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    #   points with Separator (space, line, or paragraph) property (e.g., Zs,
60885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    #   Zl, or Zp) are mapped to SPACE (U+0020).  The following is a complete
60985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    #   list of these code points: U+0020, 00A0, 1680, 2000-200A, 2028-2029,
61085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    #   202F, 205F, 3000.
61185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho
61285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "200B; ; MAP\n";
61385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "00A0; 0020; MAP\n";
61485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "1680; 0020; MAP\n";
61585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2000; 0020; MAP\n";
61685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2001; 0020; MAP\n";
61785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2002; 0020; MAP\n";
61885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2003; 0020; MAP\n";
61985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2004; 0020; MAP\n";
62085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2005; 0020; MAP\n";
62185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2006; 0020; MAP\n";
62285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2007; 0020; MAP\n";
62385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2008; 0020; MAP\n";
62485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2009; 0020; MAP\n";
62585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "200A; 0020; MAP\n";
62685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2028; 0020; MAP\n";
62785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "2029; 0020; MAP\n";
62885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "202F; 0020; MAP\n";
62985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "205F; 0020; MAP\n";
63085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "3000; 0020; MAP\n";
63185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho
63285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    print $outFH "\n# Total code points 238\n";
63385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho    close($outFH);
63485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho}
63585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho#-----------------------------------------------------------------------
636ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Querusub usage {
637ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    print << "END";
638ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruUsage:
639ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QuerufilterRFC3454.pl
640ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruOptions:
641ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        --sourcedir=<directory>
642ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        --destdir=<directory>
643ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        --src-filename=<name of RFC file>
644ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        --dest-filename=<name of destination file>
645ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        --A1             Generate data for table A.1
646ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        --B1             Generate data for table B.1
647ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        --B2             Generate data for table B.2
648ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        --B3             Generate data for table B.3
649ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        --C11            Generate data for table C.1.1
650ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        --C12            Generate data for table C.1.2
651ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        --C21            Generate data for table C.2.1
652ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        --C22            Generate data for table C.2.2
653ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        --C3             Generate data for table C.3
654ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        --C4             Generate data for table C.4
655ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        --C5             Generate data for table C.5
656ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        --C6             Generate data for table C.6
657ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        --C7             Generate data for table C.7
658ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        --C8             Generate data for table C.8
659ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        --C9             Generate data for table C.9
66085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho        --iscsi          Generate data for iSCSI extra prohibited table
66185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho        --xmpp-node      Generate data for XMPP extra prohibited table
66285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho        --sasl           Generate data for SASL map table
66385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho        --ldap           Generate data for LDAP map table
66485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho        --normalize      Embed the normalization directive in the output file
66585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho        --check-bidi     Embed the check bidi directove in the output file
666ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
667ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruNote, --B2 and --B3 are mutually exclusive.
668ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
66985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Hoe.g.: filterRFC3454.pl --sourcedir=. --destdir=./output --src-filename=rfc3454.txt  --dest-filename=NamePrepProfile.txt --A1 --B1 --B2 --C12 --C22 --C3 --C4 --C5 --C6 --C7 --C8 --C9 --normalize --check-bidi
670ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
671ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QuerufilterRFC3454.pl filters the RFC file and creates String prep table files.
672ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruThe RFC text can be downloaded from ftp://ftp.rfc-editor.org/in-notes/rfc3454.txt
673ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
674ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruEND
675ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  exit(0);
676ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}
677ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
678ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
679