From: Jarkko Hietaniemi Date: Sat, 28 Apr 2001 22:53:28 +0000 (+0000) Subject: Explain the \p{} and \P{} error message better and X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=56ca2fc0091196610c2d918908f5e362829dd24d;p=p5sagit%2Fp5-mst-13.2.git Explain the \p{} and \P{} error message better and have prettier prettyprint in In.pl. p4raw-id: //depot/perl@9899 --- diff --git a/lib/unicode/In.pl b/lib/unicode/In.pl index eefec27..e0b7a5a 100644 --- a/lib/unicode/In.pl +++ b/lib/unicode/In.pl @@ -2,100 +2,100 @@ # This file is built by mktables.PL from e.g. Unicode.txt. # Any changes made here will be lost! %utf8::In = ( -'BasicLatin' => 0, -'Latin1Supplement' => 1, -'Hebrew' => 10, -'Arabic' => 11, -'Syriac' => 12, -'Thaana' => 13, -'Devanagari' => 14, -'Bengali' => 15, -'Gurmukhi' => 16, -'Gujarati' => 17, -'Oriya' => 18, -'Tamil' => 19, -'LatinExtendedA' => 2, -'Telugu' => 20, -'Kannada' => 21, -'Malayalam' => 22, -'Sinhala' => 23, -'Thai' => 24, -'Lao' => 25, -'Tibetan' => 26, -'Myanmar' => 27, -'Georgian' => 28, -'HangulJamo' => 29, -'LatinExtendedB' => 3, -'Ethiopic' => 30, -'Cherokee' => 31, -'UnifiedCanadianAboriginalSyllabics' => 32, -'Ogham' => 33, -'Runic' => 34, -'Khmer' => 35, -'Mongolian' => 36, -'LatinExtendedAdditional' => 37, -'GreekExtended' => 38, -'GeneralPunctuation' => 39, -'IPAExtensions' => 4, -'SuperscriptsandSubscripts' => 40, -'CurrencySymbols' => 41, -'CombiningMarksforSymbols' => 42, -'LetterlikeSymbols' => 43, -'NumberForms' => 44, -'Arrows' => 45, -'MathematicalOperators' => 46, -'MiscellaneousTechnical' => 47, -'ControlPictures' => 48, -'OpticalCharacterRecognition' => 49, -'SpacingModifierLetters' => 5, -'EnclosedAlphanumerics' => 50, -'BoxDrawing' => 51, -'BlockElements' => 52, -'GeometricShapes' => 53, -'MiscellaneousSymbols' => 54, -'Dingbats' => 55, -'BraillePatterns' => 56, -'CJKRadicalsSupplement' => 57, -'KangxiRadicals' => 58, -'IdeographicDescriptionCharacters' => 59, -'CombiningDiacriticalMarks' => 6, -'CJKSymbolsandPunctuation' => 60, -'Hiragana' => 61, -'Katakana' => 62, -'Bopomofo' => 63, -'HangulCompatibilityJamo' => 64, -'Kanbun' => 65, -'BopomofoExtended' => 66, -'EnclosedCJKLettersandMonths' => 67, -'CJKCompatibility' => 68, -'CJKUnifiedIdeographsExtensionA' => 69, -'Greek' => 7, -'CJKUnifiedIdeographs' => 70, -'YiSyllables' => 71, -'YiRadicals' => 72, -'HangulSyllables' => 73, -'HighSurrogates' => 74, -'HighPrivateUseSurrogates' => 75, -'LowSurrogates' => 76, -'PrivateUse' => 77, -'CJKCompatibilityIdeographs' => 78, -'AlphabeticPresentationForms' => 79, -'Cyrillic' => 8, -'ArabicPresentationFormsA' => 80, -'CombiningHalfMarks' => 81, -'CJKCompatibilityForms' => 82, -'SmallFormVariants' => 83, -'ArabicPresentationFormsB' => 84, -'Specials' => 85, -'HalfwidthandFullwidthForms' => 86, -'OldItalic' => 87, -'Gothic' => 88, -'Deseret' => 89, -'Armenian' => 9, -'ByzantineMusicalSymbols' => 90, -'MusicalSymbols' => 91, -'MathematicalAlphanumericSymbols' => 92, -'CJKUnifiedIdeographsExtensionB' => 93, -'CJKCompatibilityIdeographsSupplement' => 94, -'Tags' => 95, +'BasicLatin' => 0, +'Latin1Supplement' => 1, +'LatinExtendedA' => 2, +'LatinExtendedB' => 3, +'IPAExtensions' => 4, +'SpacingModifierLetters' => 5, +'CombiningDiacriticalMarks' => 6, +'Greek' => 7, +'Cyrillic' => 8, +'Armenian' => 9, +'Hebrew' => 10, +'Arabic' => 11, +'Syriac' => 12, +'Thaana' => 13, +'Devanagari' => 14, +'Bengali' => 15, +'Gurmukhi' => 16, +'Gujarati' => 17, +'Oriya' => 18, +'Tamil' => 19, +'Telugu' => 20, +'Kannada' => 21, +'Malayalam' => 22, +'Sinhala' => 23, +'Thai' => 24, +'Lao' => 25, +'Tibetan' => 26, +'Myanmar' => 27, +'Georgian' => 28, +'HangulJamo' => 29, +'Ethiopic' => 30, +'Cherokee' => 31, +'UnifiedCanadianAboriginalSyllabics' => 32, +'Ogham' => 33, +'Runic' => 34, +'Khmer' => 35, +'Mongolian' => 36, +'LatinExtendedAdditional' => 37, +'GreekExtended' => 38, +'GeneralPunctuation' => 39, +'SuperscriptsandSubscripts' => 40, +'CurrencySymbols' => 41, +'CombiningMarksforSymbols' => 42, +'LetterlikeSymbols' => 43, +'NumberForms' => 44, +'Arrows' => 45, +'MathematicalOperators' => 46, +'MiscellaneousTechnical' => 47, +'ControlPictures' => 48, +'OpticalCharacterRecognition' => 49, +'EnclosedAlphanumerics' => 50, +'BoxDrawing' => 51, +'BlockElements' => 52, +'GeometricShapes' => 53, +'MiscellaneousSymbols' => 54, +'Dingbats' => 55, +'BraillePatterns' => 56, +'CJKRadicalsSupplement' => 57, +'KangxiRadicals' => 58, +'IdeographicDescriptionCharacters' => 59, +'CJKSymbolsandPunctuation' => 60, +'Hiragana' => 61, +'Katakana' => 62, +'Bopomofo' => 63, +'HangulCompatibilityJamo' => 64, +'Kanbun' => 65, +'BopomofoExtended' => 66, +'EnclosedCJKLettersandMonths' => 67, +'CJKCompatibility' => 68, +'CJKUnifiedIdeographsExtensionA' => 69, +'CJKUnifiedIdeographs' => 70, +'YiSyllables' => 71, +'YiRadicals' => 72, +'HangulSyllables' => 73, +'HighSurrogates' => 74, +'HighPrivateUseSurrogates' => 75, +'LowSurrogates' => 76, +'PrivateUse' => 77, +'CJKCompatibilityIdeographs' => 78, +'AlphabeticPresentationForms' => 79, +'ArabicPresentationFormsA' => 80, +'CombiningHalfMarks' => 81, +'CJKCompatibilityForms' => 82, +'SmallFormVariants' => 83, +'ArabicPresentationFormsB' => 84, +'Specials' => 85, +'HalfwidthandFullwidthForms' => 86, +'OldItalic' => 87, +'Gothic' => 88, +'Deseret' => 89, +'ByzantineMusicalSymbols' => 90, +'MusicalSymbols' => 91, +'MathematicalAlphanumericSymbols' => 92, +'CJKUnifiedIdeographsExtensionB' => 93, +'CJKCompatibilityIdeographsSupplement' => 94, +'Tags' => 95, ); diff --git a/lib/unicode/mktables.PL b/lib/unicode/mktables.PL index 68578b9..70ed122 100755 --- a/lib/unicode/mktables.PL +++ b/lib/unicode/mktables.PL @@ -324,8 +324,8 @@ print INID < $InId{$in},\n"; +foreach my $in (sort { $InId{$a} <=> $InId{$b} } keys %InId) { + printf INID "%-40s => %2d,\n", "'$in'", $InId{$in}; } print INID ");\n"; diff --git a/lib/utf8_heavy.pl b/lib/utf8_heavy.pl index 5637d12..ab2e15d 100644 --- a/lib/utf8_heavy.pl +++ b/lib/utf8_heavy.pl @@ -38,7 +38,7 @@ sub SWASHNEW { || do "$file.pl" || do "$encoding/$file.pl" || do "$encoding/Is/${type}.pl" - || croak("Can't find $encoding character property definition via $caller->$type or $file.pl"); + || croak("Can't find $encoding character property \"$type\""); $| = 1; diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 8d40822..a2614c1 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -628,6 +628,13 @@ found in the PATH did not have correct permissions. (F) A string of a form C was given to prototype(), but there is no builtin with the name C. +=item Can't find %s character property "%s" + +(F) You used C<\p{}> or C<\P{}> but the character property by that name +could not be find. Maybe you mispelled the name of the property +(remember that the names of character properties consist only of +alphanumeric characters), or maybe you forgot the C or C prefix? + =item Can't find label %s (F) You said to goto a label that isn't mentioned anywhere that it's