#! /usr/bin/perl -w use strict; my $locale = $ARGV[0]; my $long_name = `/home/weiv/src/icu/source/extra/colprobe/longname $locale`; my $pageTitle = $locale."_collation"; my $filename = $pageTitle.".html"; open TABLE, ">$filename"; print TABLE <<"EndOfTemplate"; $pageTitle

Collation: $locale ($long_name) Demo, Cover Page, Index

EndOfTemplate my $dirCommon = "common"; my $refCommon = $dirCommon."/UCARules.txt"; my $nameCommon = $dirCommon."/".$locale."_collation.html"; my $colorCommon = "#AD989D"; my $loc; if(!(-e $nameCommon)) { $locale =~ /_/; $loc = $`; $nameCommon = "$dirCommon/$loc"."_collation.html"; } print TABLE " \n"; my $dirLinux = "linux"; my $refLinux = $dirLinux."/".$locale.".utf8_default_raw.html"; my $rawLinux = $dirLinux."/".$locale.".utf8_raw.html"; my $defLinux = $dirLinux."/".$locale; my $nameLinux = "$dirLinux/$locale".".utf8_collation.html"; my $colorLinux = "#1191F1"; print TABLE " \n"; my $dirWin = "winxp"; my $refWin = $dirWin."/".$locale."_default_raw.html"; my $rawWin = $dirWin."/".$locale."_raw.html"; my $nameWin = "$dirWin/$locale"."_collation.html"; my $colorWin = "#98FB98"; print TABLE " \n"; print TABLE " \n "; readRules($nameCommon, "#AD989D", "Same as the UCA."); readRules($nameLinux, "#1191F1", "No data available."); readRules($nameWin, "#98FB98", "No data available."); print TABLE <<"EndOfFooter";
COMMON (UCA xml)LINUX ("; if (!(-e $nameLinux)) { #try the variant that has @euro stuck in $nameLinux = "$dirLinux/$locale".'.utf8@euro_collation.html'; if(-e $nameLinux) { $refLinux = $dirLinux."/".$locale.'.utf8@euro_default_raw.html'; $rawLinux = $dirLinux."/".$locale.'.utf8@euro_raw.html'; } } if (-e $nameLinux) { print TABLE "Ordering Definition base"; } print TABLE " xml)WINDOWS ("; if (-e $nameWin) { print TABLE "Ordering base "; } print TABLE "xml)
EndOfFooter sub readRules { # readRules($file, $color) my $filename = shift; my $color = shift; my $comment = shift; my $noLines = 0; my $printOut = 0; my $file; if(-e $filename) { open($file, "<$filename") || die "something very strange happened\n"; print TABLE "\n"; while (<$file>) { if (/\}\$/) { $printOut = 0; } if ($printOut) { print TABLE $_; $noLines++; } if (/Sequence/) { $printOut = 1; print "found sequence\n"; $noLines = 0; } } if (!$noLines) { print TABLE "Same ordering as base\n"; } print TABLE "\n"; } else { print TABLE "\n$comment\n"; } } # Tasting of food product # 650-574-4551 $50 1 hour # 1.0-alpha # 1.0 # = # &n
#   < ny
#         = nny / ny
#       <<< nY
# # = # 1.2 # Windows XP # = # =