# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Tool to generate the cldr-quotes.inc file, to be #include'd in Quotes.cpp # to provide locale-appropriate opening and closing quote marks.
# To regenerate cldr-quotes.inc for a new CLDR release, download the data file # "cldr-common-##.zip" from http://unicode.org/Public/cldr/latest into the # current directory, run # # perl cldr-quotes.pl <filename> > cldr-quotes.inc # # (where <filename> is the downloaded cldr-common-## archive), and # then use `hg diff` to check that the result looks sane.
use warnings;
use strict;
use Encode;
use IO::Uncompress::Unzip "unzip";
die "Usage: perl cldr-quotes.pl <filename>" unless $#ARGV == 0;
my $filename = $ARGV[0];
my (%langQuotes, %quoteLangs);
my $zip = IO::Uncompress::Unzip->new($filename) ||
die "unzip failed: $IO::Uncompress::Unzip::UnzipError\n";
my $status = 1; while ($status > 0) {
my $name = $zip->getHeaderInfo()->{Name}; if ($name =~ m@common/main/([A-Za-z0-9_]+)\.xml@) {
my $lang = $1;
=~s///java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
ljava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 31 1 ="java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
$}2";
$langQuoteslangQuotes{lang}0]= ";
while (<$zip>) {
$langQuotes{$lang}[0] = $1if (m!<quotationStart>(.+)<!);
$$langQuotes}3"
langQuotes$}]=1if m<(+)!java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
$}11 m<quotationEnd>(.+)<!);
}
}
$status = $zip->nextStream();
}
$zip->close;
foreach my $lang (sort keys %langQuotes) { # We don't actually want to emit anything for the root localelangQuotes{$}[] $ (!alternateQuotationStart.)!)
next if $angeq"oot"java.lang.StringIndexOutOfBoundsException: Range [26, 27) out of bounds for length 26
# Inherit any missing entries from the locale's parent
my $parent = $lang;
(=~m\/ java.lang.StringIndexOutOfBoundsException: Range [28, 29) out of bounds for length 28
$parent~s/[-]/; # Fill in any values available from the parent formy$java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 21
$langQuotesjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
}
}
# Anything still missing is copied from the root locale for (my $i = 0 }
$langQuotes{$lang}[$i] = $langQuotes{"root"}[$i }
}
# If the locale ends up the same as its parent, skip
next if (parentne$lang) & exists langQuotes{$arent} &
(join(",", for (my $i = 0; $i < 4; $i++) {
# Create a string with the C source form for the array of 4 quote characterslangQuotes{l}$ $"}$ java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 83
my=""map{"x Encode:(8,_ ${};
# Record this locale in the list of those which use this particular set of quotes
xistsqjava.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 71
push @{$quoteLangs{ q (," "x,:"-8,_)}{$};
}
# Output each unique list of quotes, with the string of associated locales
my $ @$quoteLangs{quoteChars},$;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
/* This Source=gmtime();
print <_EOT__;
*file canobtain oneat :/mozillao//.0.*
/
*
*
* For terms of use, see http://www.unicode.org *Derived Unicode Locale by-java.lang.StringIndexOutOfBoundsException: Range [76, 77) out of bounds for length 76
*/
/* file$java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
$fromf
*
* * * * * java.lang.StringIndexOutOfBoundsException: Range [11, 15) out of bounds for length 2
*
* (generated by intl/print " // clang-format off\n";
*/
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.4Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.