unicodemap.pl revision 0ddb604f911b908085ef787455c015a91dc9c365
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainenmy (@multidecomp_keys, @multidecomp_offsets, @multidecomp_values);
db3b95d5a33ddce552d41136ae68d7331f8bf5feTimo Sirainen # titlecase mapping
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen # the same character, ignore
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen } elsif ($code <= 0xffff && $value <= 0xffff) {
db3b95d5a33ddce552d41136ae68d7331f8bf5feTimo Sirainen } elsif ($decomp =~ /\<[^>]*> (.+)/) {
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen # decompositions
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen # unicharacter decomposition. use separate lists for this
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen print STDERR "We've assumed decomposition codes are max. 16bit\n";
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen # multicharacter decomposition.
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen print STDERR "We've assumed multi-decomposition key codes are max. 16bit\n";
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen push @multidecomp_offsets, scalar(@multidecomp_values);
2cd04598af2b69120948e29f2a0dd1710bebbe1bTimo Sirainen foreach my $dcode (split(" ", $decomp_codes)) {
2cd04598af2b69120948e29f2a0dd1710bebbe1bTimo Sirainen print STDERR "We've assumed decomposition codes are max. 16bit\n";
db3b95d5a33ddce552d41136ae68d7331f8bf5feTimo Sirainen last if ($n == $last);
db3b95d5a33ddce552d41136ae68d7331f8bf5feTimo Sirainen print "\n\t";
db3b95d5a33ddce552d41136ae68d7331f8bf5feTimo Sirainenprint "/* This file is automatically generated by unicodemap.pl from UnicodeData.txt
db3b95d5a33ddce552d41136ae68d7331f8bf5feTimo Sirainen NOTE: decompositions for characters having titlecase characters
db3b95d5a33ddce552d41136ae68d7331f8bf5feTimo Sirainen are not included, because we first translate everything to titlecase */\n";
db3b95d5a33ddce552d41136ae68d7331f8bf5feTimo Sirainenprint "static uint16_t titlecase16_keys[] = {\n\t";
db3b95d5a33ddce552d41136ae68d7331f8bf5feTimo Sirainenprint "\n};\n";
db3b95d5a33ddce552d41136ae68d7331f8bf5feTimo Sirainenprint "static uint16_t titlecase16_values[] = {\n\t";
db3b95d5a33ddce552d41136ae68d7331f8bf5feTimo Sirainenprint "\n};\n";
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainenprint "static uint32_t titlecase32_keys[] = {\n\t";
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainenprint "\n};\n";
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainenprint "static uint32_t titlecase32_values[] = {\n\t";
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainenprint "\n};\n";
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainenprint "static uint16_t uni16_decomp_keys[] = {\n\t";
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainenprint "\n};\n";
e2a88d59c0d47d63ce1ad5b1fd95e487124a3fd4Timo Sirainenprint "static uint16_t uni16_decomp_values[] = {\n\t";
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainenprint "\n};\n";
0dc72981f5286d60ca9233f6ac7c444d393d24fbTimo Sirainenprint "static uint32_t uni32_decomp_keys[] = {\n\t";
0dc72981f5286d60ca9233f6ac7c444d393d24fbTimo Sirainenprint "\n};\n";
0dc72981f5286d60ca9233f6ac7c444d393d24fbTimo Sirainenprint "static uint16_t uni32_decomp_values[] = {\n\t";
0dc72981f5286d60ca9233f6ac7c444d393d24fbTimo Sirainenprint "\n};\n";
0dc72981f5286d60ca9233f6ac7c444d393d24fbTimo Sirainenprint "static uint16_t multidecomp_keys[] = {\n\t";
152db3f90f298b7fb2dbbd4276f0fc30a9bc30f6Timo Sirainenprint "\n};\n";
152db3f90f298b7fb2dbbd4276f0fc30a9bc30f6Timo Sirainenprint "static uint16_t multidecomp_offsets[] = {\n\t";
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainenprint "\n};\n";
44875c83e0fa7111571262686818d8de43a57b2fTimo Sirainenprint "static uint16_t multidecomp_values[] = {\n\t";
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainenprint "\n};\n";