diff --git a/UnicodeInformation/BidirectionalClass.cs b/UnicodeInformation/BidirectionalClass.cs index 4287dca..62c503b 100644 --- a/UnicodeInformation/BidirectionalClass.cs +++ b/UnicodeInformation/BidirectionalClass.cs @@ -9,51 +9,51 @@ namespace UnicodeInformation { public enum BidirectionalClass : byte { - [Display(Name = "Left_To_Right", Description = "any strong left-to-right character")] + [ValueName("L"), ValueName("Left_To_Right"), Display(Name = "Left_To_Right", Description = "any strong left-to-right character")] LeftToRight, - [Display(Name = "Right_To_Left", Description = "any strong right-to-left (non-Arabic-type) character")] + [ValueName("R"), ValueName("Right_To_Left"), Display(Name = "Right_To_Left", Description = "any strong right-to-left (non-Arabic-type) character")] RightToLeft, - [Display(Name = "Arabic_Letter", Description = "any strong right-to-left (Arabic-type) character")] + [ValueName("AL"), ValueName("Arabic_Letter"), Display(Name = "Arabic_Letter", Description = "any strong right-to-left (Arabic-type) character")] ArabicLetter, - [Display(Name = "European_Number", Description = "any ASCII digit or Eastern Arabic-Indic digit")] + [ValueName("EN"), ValueName("European_Number"), Display(Name = "European_Number", Description = "any ASCII digit or Eastern Arabic-Indic digit")] EuropeanNumber, - [Display(Name = "European_Separator", Description = "plus and minus signs")] + [ValueName("ES"), ValueName("European_Separator"), Display(Name = "European_Separator", Description = "plus and minus signs")] EuropeanSeparator, - [Display(Name = "European_Terminator", Description = "a terminator in a numeric format context, includes currency signs")] + [ValueName("ET"), ValueName("European_Terminator"), Display(Name = "European_Terminator", Description = "a terminator in a numeric format context, includes currency signs")] EuropeanTerminator, - [Display(Name = "Arabic_Number", Description = "any Arabic-Indic digit")] + [ValueName("AN"), ValueName("Arabic_Number"), Display(Name = "Arabic_Number", Description = "any Arabic-Indic digit")] ArabicNumber, - [Display(Name = "Common_Separator", Description = "commas, colons, and slashes")] + [ValueName("CS"), ValueName("Common_Separator"), Display(Name = "Common_Separator", Description = "commas, colons, and slashes")] CommonSeparator, - [Display(Name = "Nonspacing_Mark", Description = "any nonspacing mark")] + [ValueName("NSM"), ValueName("Nonspacing_Mark"), Display(Name = "Nonspacing_Mark", Description = "any nonspacing mark")] NonspacingMark, - [Display(Name = "Boundary_Neutral", Description = "most format characters, control codes, or noncharacters")] + [ValueName("BN"), ValueName("Boundary_Neutral"), Display(Name = "Boundary_Neutral", Description = "most format characters, control codes, or noncharacters")] BoundaryNeutral, - [Display(Name = "Paragraph_Separator", Description = "various newline characters")] + [ValueName("B"), ValueName("Paragraph_Separator"), Display(Name = "Paragraph_Separator", Description = "various newline characters")] ParagraphSeparator, - [Display(Name = "Segment_Separator", Description = "various segment-related control codes")] + [ValueName("S"), ValueName("Segment_Separator"), Display(Name = "Segment_Separator", Description = "various segment-related control codes")] SegmentSeparator, - [Display(Name = "White_Space", Description = "spaces")] + [ValueName("WS"), ValueName("White_Space"), Display(Name = "White_Space", Description = "spaces")] WhiteSpace, - [Display(Name = "Other_Neutral", Description = "most other symbols and punctuation marks")] + [ValueName("ON"), ValueName("Other_Neutral"), Display(Name = "Other_Neutral", Description = "most other symbols and punctuation marks")] OtherNeutral, - [Display(Name = "Left_To_Right_Embedding", Description = "U+202A: the LR embedding control")] + [ValueName("LRE"), ValueName("Left_To_Right_Embedding"), Display(Name = "Left_To_Right_Embedding", Description = "U+202A: the LR embedding control")] LeftToRightEmbedding, - [Display(Name = "Left_To_Right_Override", Description = "U+202D: the LR override control")] + [ValueName("LRO"), ValueName("Left_To_Right_Override"), Display(Name = "Left_To_Right_Override", Description = "U+202D: the LR override control")] LeftToRightOverride, - [Display(Name = "Right_To_Left_Embedding", Description = "U+202B: the RL embedding control")] + [ValueName("RLE"), ValueName("Right_To_Left_Embedding"), Display(Name = "Right_To_Left_Embedding", Description = "U+202B: the RL embedding control")] RightToLeftEmbedding, - [Display(Name = "Right_To_Left_Override", Description = "U+202E: the RL override control")] + [ValueName("RLO"), ValueName("Right_To_Left_Override"), Display(Name = "Right_To_Left_Override", Description = "U+202E: the RL override control")] RightToLeftOverride, - [Display(Name = "Pop_Directional_Format", Description = "U+202C: terminates an embedding or override control")] + [ValueName("PDF"), ValueName("Pop_Directional_Format"), Display(Name = "Pop_Directional_Format", Description = "U+202C: terminates an embedding or override control")] PopDirectionalFormat, - [Display(Name = "Left_To_Right_Isolate", Description = "U+2066: the LR isolate control")] + [ValueName("LRI"), ValueName("Left_To_Right_Isolate"), Display(Name = "Left_To_Right_Isolate", Description = "U+2066: the LR isolate control")] LeftToRightIsolate, - [Display(Name = "Right_To_Left_Isolate", Description = "U+2067: the RL isolate control")] + [ValueName("RLI"), ValueName("Right_To_Left_Isolate"), Display(Name = "Right_To_Left_Isolate", Description = "U+2067: the RL isolate control")] RightToLeftIsolate, - [Display(Name = "First_Strong_Isolate", Description = "U+2068: the first strong isolate control")] + [ValueName("FSI"), ValueName("First_Strong_Isolate"), Display(Name = "First_Strong_Isolate", Description = "U+2068: the first strong isolate control")] FirstStrongIsolate, - [Display(Name = "Pop_Directional_Isolate", Description = "U+2069: terminates an isolate control")] + [ValueName("PDI"), ValueName("Pop_Directional_Isolate"), Display(Name = "Pop_Directional_Isolate", Description = "U+2069: terminates an isolate control")] PopDirectionalIsolate, } } diff --git a/UnicodeInformation/CanonicalCombiningClass.cs b/UnicodeInformation/CanonicalCombiningClass.cs index 4d0d8c5..a8bfc4a 100644 --- a/UnicodeInformation/CanonicalCombiningClass.cs +++ b/UnicodeInformation/CanonicalCombiningClass.cs @@ -4,433 +4,433 @@ namespace UnicodeInformation { public enum CanonicalCombiningClass : byte { - [Display(Name = "Not_Reordered", Description = "Spacing and enclosing marks; also many vowel and consonant signs, even if nonspacing")] + [ValueName("Not_Reordered"), Display(Name = "Not_Reordered", Description = "Spacing and enclosing marks; also many vowel and consonant signs, even if nonspacing")] NotReordered = 0, - [Display(Name = "Overlay", Description = "Marks which overlay a base letter or symbol")] + [ValueName("Overlay"), Display(Name = "Overlay", Description = "Marks which overlay a base letter or symbol")] Overlay = 1, - [Display(Name = "Nukta", Description = "Diacritic nukta marks in Brahmi-derived scripts")] + [ValueName("Nukta"), Display(Name = "Nukta", Description = "Diacritic nukta marks in Brahmi-derived scripts")] Nukta = 7, - [Display(Name = "Kana_Voicing", Description = "Hiragana/Katakana voicing marks")] + [ValueName("Kana_Voicing"), Display(Name = "Kana_Voicing", Description = "Hiragana/Katakana voicing marks")] KanaVoicing = 8, - [Display(Name = "Virama", Description = "Viramas")] + [ValueName("Virama"), Display(Name = "Virama", Description = "Viramas")] Virama = 9, - [Display(Name = "Ccc10", Description = "Start of fixed position classes")] + [ValueName("Ccc10"), Display(Name = "Ccc10", Description = "Start of fixed position classes")] Ccc10 = 10, - [Display(Name = "Ccc11")] + [ValueName("Ccc11"), Display(Name = "Ccc11")] Ccc11 = 11, - [Display(Name = "Ccc12")] + [ValueName("Ccc12"), Display(Name = "Ccc12")] Ccc12 = 12, - [Display(Name = "Ccc13")] + [ValueName("Ccc13"), Display(Name = "Ccc13")] Ccc13 = 13, - [Display(Name = "Ccc14")] + [ValueName("Ccc14"), Display(Name = "Ccc14")] Ccc14 = 14, - [Display(Name = "Ccc15")] + [ValueName("Ccc15"), Display(Name = "Ccc15")] Ccc15 = 15, - [Display(Name = "Ccc16")] + [ValueName("Ccc16"), Display(Name = "Ccc16")] Ccc16 = 16, - [Display(Name = "Ccc17")] + [ValueName("Ccc17"), Display(Name = "Ccc17")] Ccc17 = 17, - [Display(Name = "Ccc18")] + [ValueName("Ccc18"), Display(Name = "Ccc18")] Ccc18 = 18, - [Display(Name = "Ccc19")] + [ValueName("Ccc19"), Display(Name = "Ccc19")] Ccc19 = 19, - [Display(Name = "Ccc20")] + [ValueName("Ccc20"), Display(Name = "Ccc20")] Ccc20 = 20, - [Display(Name = "Ccc21")] + [ValueName("Ccc21"), Display(Name = "Ccc21")] Ccc21 = 21, - [Display(Name = "Ccc22")] + [ValueName("Ccc22"), Display(Name = "Ccc22")] Ccc22 = 22, - [Display(Name = "Ccc23")] + [ValueName("Ccc23"), Display(Name = "Ccc23")] Ccc23 = 23, - [Display(Name = "Ccc24")] + [ValueName("Ccc24"), Display(Name = "Ccc24")] Ccc24 = 24, - [Display(Name = "Ccc25")] + [ValueName("Ccc25"), Display(Name = "Ccc25")] Ccc25 = 25, - [Display(Name = "Ccc26")] + [ValueName("Ccc26"), Display(Name = "Ccc26")] Ccc26 = 26, - [Display(Name = "Ccc27")] + [ValueName("Ccc27"), Display(Name = "Ccc27")] Ccc27 = 27, - [Display(Name = "Ccc28")] + [ValueName("Ccc28"), Display(Name = "Ccc28")] Ccc28 = 28, - [Display(Name = "Ccc29")] + [ValueName("Ccc29"), Display(Name = "Ccc29")] Ccc29 = 29, - [Display(Name = "Ccc30")] + [ValueName("Ccc30"), Display(Name = "Ccc30")] Ccc30 = 30, - [Display(Name = "Ccc31")] + [ValueName("Ccc31"), Display(Name = "Ccc31")] Ccc31 = 31, - [Display(Name = "Ccc32")] + [ValueName("Ccc32"), Display(Name = "Ccc32")] Ccc32 = 32, - [Display(Name = "Ccc33")] + [ValueName("Ccc33"), Display(Name = "Ccc33")] Ccc33 = 33, - [Display(Name = "Ccc34")] + [ValueName("Ccc34"), Display(Name = "Ccc34")] Ccc34 = 34, - [Display(Name = "Ccc35")] + [ValueName("Ccc35"), Display(Name = "Ccc35")] Ccc35 = 35, - [Display(Name = "Ccc36")] + [ValueName("Ccc36"), Display(Name = "Ccc36")] Ccc36 = 36, - [Display(Name = "Ccc37")] + [ValueName("Ccc37"), Display(Name = "Ccc37")] Ccc37 = 37, - [Display(Name = "Ccc38")] + [ValueName("Ccc38"), Display(Name = "Ccc38")] Ccc38 = 38, - [Display(Name = "Ccc39")] + [ValueName("Ccc39"), Display(Name = "Ccc39")] Ccc39 = 39, - [Display(Name = "Ccc40")] + [ValueName("Ccc40"), Display(Name = "Ccc40")] Ccc40 = 40, - [Display(Name = "Ccc41")] + [ValueName("Ccc41"), Display(Name = "Ccc41")] Ccc41 = 41, - [Display(Name = "Ccc42")] + [ValueName("Ccc42"), Display(Name = "Ccc42")] Ccc42 = 42, - [Display(Name = "Ccc43")] + [ValueName("Ccc43"), Display(Name = "Ccc43")] Ccc43 = 43, - [Display(Name = "Ccc44")] + [ValueName("Ccc44"), Display(Name = "Ccc44")] Ccc44 = 44, - [Display(Name = "Ccc45")] + [ValueName("Ccc45"), Display(Name = "Ccc45")] Ccc45 = 45, - [Display(Name = "Ccc46")] + [ValueName("Ccc46"), Display(Name = "Ccc46")] Ccc46 = 46, - [Display(Name = "Ccc47")] + [ValueName("Ccc47"), Display(Name = "Ccc47")] Ccc47 = 47, - [Display(Name = "Ccc48")] + [ValueName("Ccc48"), Display(Name = "Ccc48")] Ccc48 = 48, - [Display(Name = "Ccc49")] + [ValueName("Ccc49"), Display(Name = "Ccc49")] Ccc49 = 49, - [Display(Name = "Ccc50")] + [ValueName("Ccc50"), Display(Name = "Ccc50")] Ccc50 = 50, - [Display(Name = "Ccc51")] + [ValueName("Ccc51"), Display(Name = "Ccc51")] Ccc51 = 51, - [Display(Name = "Ccc52")] + [ValueName("Ccc52"), Display(Name = "Ccc52")] Ccc52 = 52, - [Display(Name = "Ccc53")] + [ValueName("Ccc53"), Display(Name = "Ccc53")] Ccc53 = 53, - [Display(Name = "Ccc54")] + [ValueName("Ccc54"), Display(Name = "Ccc54")] Ccc54 = 54, - [Display(Name = "Ccc55")] + [ValueName("Ccc55"), Display(Name = "Ccc55")] Ccc55 = 55, - [Display(Name = "Ccc56")] + [ValueName("Ccc56"), Display(Name = "Ccc56")] Ccc56 = 56, - [Display(Name = "Ccc57")] + [ValueName("Ccc57"), Display(Name = "Ccc57")] Ccc57 = 57, - [Display(Name = "Ccc58")] + [ValueName("Ccc58"), Display(Name = "Ccc58")] Ccc58 = 58, - [Display(Name = "Ccc59")] + [ValueName("Ccc59"), Display(Name = "Ccc59")] Ccc59 = 59, - [Display(Name = "Ccc60")] + [ValueName("Ccc60"), Display(Name = "Ccc60")] Ccc60 = 60, - [Display(Name = "Ccc61")] + [ValueName("Ccc61"), Display(Name = "Ccc61")] Ccc61 = 61, - [Display(Name = "Ccc62")] + [ValueName("Ccc62"), Display(Name = "Ccc62")] Ccc62 = 62, - [Display(Name = "Ccc63")] + [ValueName("Ccc63"), Display(Name = "Ccc63")] Ccc63 = 63, - [Display(Name = "Ccc64")] + [ValueName("Ccc64"), Display(Name = "Ccc64")] Ccc64 = 64, - [Display(Name = "Ccc65")] + [ValueName("Ccc65"), Display(Name = "Ccc65")] Ccc65 = 65, - [Display(Name = "Ccc66")] + [ValueName("Ccc66"), Display(Name = "Ccc66")] Ccc66 = 66, - [Display(Name = "Ccc67")] + [ValueName("Ccc67"), Display(Name = "Ccc67")] Ccc67 = 67, - [Display(Name = "Ccc68")] + [ValueName("Ccc68"), Display(Name = "Ccc68")] Ccc68 = 68, - [Display(Name = "Ccc69")] + [ValueName("Ccc69"), Display(Name = "Ccc69")] Ccc69 = 69, - [Display(Name = "Ccc70")] + [ValueName("Ccc70"), Display(Name = "Ccc70")] Ccc70 = 70, - [Display(Name = "Ccc71")] + [ValueName("Ccc71"), Display(Name = "Ccc71")] Ccc71 = 71, - [Display(Name = "Ccc72")] + [ValueName("Ccc72"), Display(Name = "Ccc72")] Ccc72 = 72, - [Display(Name = "Ccc73")] + [ValueName("Ccc73"), Display(Name = "Ccc73")] Ccc73 = 73, - [Display(Name = "Ccc74")] + [ValueName("Ccc74"), Display(Name = "Ccc74")] Ccc74 = 74, - [Display(Name = "Ccc75")] + [ValueName("Ccc75"), Display(Name = "Ccc75")] Ccc75 = 75, - [Display(Name = "Ccc76")] + [ValueName("Ccc76"), Display(Name = "Ccc76")] Ccc76 = 76, - [Display(Name = "Ccc77")] + [ValueName("Ccc77"), Display(Name = "Ccc77")] Ccc77 = 77, - [Display(Name = "Ccc78")] + [ValueName("Ccc78"), Display(Name = "Ccc78")] Ccc78 = 78, - [Display(Name = "Ccc79")] + [ValueName("Ccc79"), Display(Name = "Ccc79")] Ccc79 = 79, - [Display(Name = "Ccc80")] + [ValueName("Ccc80"), Display(Name = "Ccc80")] Ccc80 = 80, - [Display(Name = "Ccc81")] + [ValueName("Ccc81"), Display(Name = "Ccc81")] Ccc81 = 81, - [Display(Name = "Ccc82")] + [ValueName("Ccc82"), Display(Name = "Ccc82")] Ccc82 = 82, - [Display(Name = "Ccc83")] + [ValueName("Ccc83"), Display(Name = "Ccc83")] Ccc83 = 83, - [Display(Name = "Ccc84")] + [ValueName("Ccc84"), Display(Name = "Ccc84")] Ccc84 = 84, - [Display(Name = "Ccc85")] + [ValueName("Ccc85"), Display(Name = "Ccc85")] Ccc85 = 85, - [Display(Name = "Ccc86")] + [ValueName("Ccc86"), Display(Name = "Ccc86")] Ccc86 = 86, - [Display(Name = "Ccc87")] + [ValueName("Ccc87"), Display(Name = "Ccc87")] Ccc87 = 87, - [Display(Name = "Ccc88")] + [ValueName("Ccc88"), Display(Name = "Ccc88")] Ccc88 = 88, - [Display(Name = "Ccc89")] + [ValueName("Ccc89"), Display(Name = "Ccc89")] Ccc89 = 89, - [Display(Name = "Ccc90")] + [ValueName("Ccc90"), Display(Name = "Ccc90")] Ccc90 = 90, - [Display(Name = "Ccc91")] + [ValueName("Ccc91"), Display(Name = "Ccc91")] Ccc91 = 91, - [Display(Name = "Ccc92")] + [ValueName("Ccc92"), Display(Name = "Ccc92")] Ccc92 = 92, - [Display(Name = "Ccc93")] + [ValueName("Ccc93"), Display(Name = "Ccc93")] Ccc93 = 93, - [Display(Name = "Ccc94")] + [ValueName("Ccc94"), Display(Name = "Ccc94")] Ccc94 = 94, - [Display(Name = "Ccc95")] + [ValueName("Ccc95"), Display(Name = "Ccc95")] Ccc95 = 95, - [Display(Name = "Ccc96")] + [ValueName("Ccc96"), Display(Name = "Ccc96")] Ccc96 = 96, - [Display(Name = "Ccc97")] + [ValueName("Ccc97"), Display(Name = "Ccc97")] Ccc97 = 97, - [Display(Name = "Ccc98")] + [ValueName("Ccc98"), Display(Name = "Ccc98")] Ccc98 = 98, - [Display(Name = "Ccc99")] + [ValueName("Ccc99"), Display(Name = "Ccc99")] Ccc99 = 99, - [Display(Name = "Ccc100")] + [ValueName("Ccc100"), Display(Name = "Ccc100")] Ccc100 = 100, - [Display(Name = "Ccc101")] + [ValueName("Ccc101"), Display(Name = "Ccc101")] Ccc101 = 101, - [Display(Name = "Ccc102")] + [ValueName("Ccc102"), Display(Name = "Ccc102")] Ccc102 = 102, - [Display(Name = "Ccc103")] + [ValueName("Ccc103"), Display(Name = "Ccc103")] Ccc103 = 103, - [Display(Name = "Ccc104")] + [ValueName("Ccc104"), Display(Name = "Ccc104")] Ccc104 = 104, - [Display(Name = "Ccc105")] + [ValueName("Ccc105"), Display(Name = "Ccc105")] Ccc105 = 105, - [Display(Name = "Ccc106")] + [ValueName("Ccc106"), Display(Name = "Ccc106")] Ccc106 = 106, - [Display(Name = "Ccc107")] + [ValueName("Ccc107"), Display(Name = "Ccc107")] Ccc107 = 107, - [Display(Name = "Ccc108")] + [ValueName("Ccc108"), Display(Name = "Ccc108")] Ccc108 = 108, - [Display(Name = "Ccc109")] + [ValueName("Ccc109"), Display(Name = "Ccc109")] Ccc109 = 109, - [Display(Name = "Ccc110")] + [ValueName("Ccc110"), Display(Name = "Ccc110")] Ccc110 = 110, - [Display(Name = "Ccc111")] + [ValueName("Ccc111"), Display(Name = "Ccc111")] Ccc111 = 111, - [Display(Name = "Ccc112")] + [ValueName("Ccc112"), Display(Name = "Ccc112")] Ccc112 = 112, - [Display(Name = "Ccc113")] + [ValueName("Ccc113"), Display(Name = "Ccc113")] Ccc113 = 113, - [Display(Name = "Ccc114")] + [ValueName("Ccc114"), Display(Name = "Ccc114")] Ccc114 = 114, - [Display(Name = "Ccc115")] + [ValueName("Ccc115"), Display(Name = "Ccc115")] Ccc115 = 115, - [Display(Name = "Ccc116")] + [ValueName("Ccc116"), Display(Name = "Ccc116")] Ccc116 = 116, - [Display(Name = "Ccc117")] + [ValueName("Ccc117"), Display(Name = "Ccc117")] Ccc117 = 117, - [Display(Name = "Ccc118")] + [ValueName("Ccc118"), Display(Name = "Ccc118")] Ccc118 = 118, - [Display(Name = "Ccc119")] + [ValueName("Ccc119"), Display(Name = "Ccc119")] Ccc119 = 119, - [Display(Name = "Ccc120")] + [ValueName("Ccc120"), Display(Name = "Ccc120")] Ccc120 = 120, - [Display(Name = "Ccc121")] + [ValueName("Ccc121"), Display(Name = "Ccc121")] Ccc121 = 121, - [Display(Name = "Ccc122")] + [ValueName("Ccc122"), Display(Name = "Ccc122")] Ccc122 = 122, - [Display(Name = "Ccc123")] + [ValueName("Ccc123"), Display(Name = "Ccc123")] Ccc123 = 123, - [Display(Name = "Ccc124")] + [ValueName("Ccc124"), Display(Name = "Ccc124")] Ccc124 = 124, - [Display(Name = "Ccc125")] + [ValueName("Ccc125"), Display(Name = "Ccc125")] Ccc125 = 125, - [Display(Name = "Ccc126")] + [ValueName("Ccc126"), Display(Name = "Ccc126")] Ccc126 = 126, - [Display(Name = "Ccc127")] + [ValueName("Ccc127"), Display(Name = "Ccc127")] Ccc127 = 127, - [Display(Name = "Ccc128")] + [ValueName("Ccc128"), Display(Name = "Ccc128")] Ccc128 = 128, - [Display(Name = "Ccc129")] + [ValueName("Ccc129"), Display(Name = "Ccc129")] Ccc129 = 129, - [Display(Name = "Ccc130")] + [ValueName("Ccc130"), Display(Name = "Ccc130")] Ccc130 = 130, - [Display(Name = "Ccc131")] + [ValueName("Ccc131"), Display(Name = "Ccc131")] Ccc131 = 131, - [Display(Name = "Ccc132")] + [ValueName("Ccc132"), Display(Name = "Ccc132")] Ccc132 = 132, - [Display(Name = "Ccc133")] + [ValueName("Ccc133"), Display(Name = "Ccc133")] Ccc133 = 133, - [Display(Name = "Ccc134")] + [ValueName("Ccc134"), Display(Name = "Ccc134")] Ccc134 = 134, - [Display(Name = "Ccc135")] + [ValueName("Ccc135"), Display(Name = "Ccc135")] Ccc135 = 135, - [Display(Name = "Ccc136")] + [ValueName("Ccc136"), Display(Name = "Ccc136")] Ccc136 = 136, - [Display(Name = "Ccc137")] + [ValueName("Ccc137"), Display(Name = "Ccc137")] Ccc137 = 137, - [Display(Name = "Ccc138")] + [ValueName("Ccc138"), Display(Name = "Ccc138")] Ccc138 = 138, - [Display(Name = "Ccc139")] + [ValueName("Ccc139"), Display(Name = "Ccc139")] Ccc139 = 139, - [Display(Name = "Ccc140")] + [ValueName("Ccc140"), Display(Name = "Ccc140")] Ccc140 = 140, - [Display(Name = "Ccc141")] + [ValueName("Ccc141"), Display(Name = "Ccc141")] Ccc141 = 141, - [Display(Name = "Ccc142")] + [ValueName("Ccc142"), Display(Name = "Ccc142")] Ccc142 = 142, - [Display(Name = "Ccc143")] + [ValueName("Ccc143"), Display(Name = "Ccc143")] Ccc143 = 143, - [Display(Name = "Ccc144")] + [ValueName("Ccc144"), Display(Name = "Ccc144")] Ccc144 = 144, - [Display(Name = "Ccc145")] + [ValueName("Ccc145"), Display(Name = "Ccc145")] Ccc145 = 145, - [Display(Name = "Ccc146")] + [ValueName("Ccc146"), Display(Name = "Ccc146")] Ccc146 = 146, - [Display(Name = "Ccc147")] + [ValueName("Ccc147"), Display(Name = "Ccc147")] Ccc147 = 147, - [Display(Name = "Ccc148")] + [ValueName("Ccc148"), Display(Name = "Ccc148")] Ccc148 = 148, - [Display(Name = "Ccc149")] + [ValueName("Ccc149"), Display(Name = "Ccc149")] Ccc149 = 149, - [Display(Name = "Ccc150")] + [ValueName("Ccc150"), Display(Name = "Ccc150")] Ccc150 = 150, - [Display(Name = "Ccc151")] + [ValueName("Ccc151"), Display(Name = "Ccc151")] Ccc151 = 151, - [Display(Name = "Ccc152")] + [ValueName("Ccc152"), Display(Name = "Ccc152")] Ccc152 = 152, - [Display(Name = "Ccc153")] + [ValueName("Ccc153"), Display(Name = "Ccc153")] Ccc153 = 153, - [Display(Name = "Ccc154")] + [ValueName("Ccc154"), Display(Name = "Ccc154")] Ccc154 = 154, - [Display(Name = "Ccc155")] + [ValueName("Ccc155"), Display(Name = "Ccc155")] Ccc155 = 155, - [Display(Name = "Ccc156")] + [ValueName("Ccc156"), Display(Name = "Ccc156")] Ccc156 = 156, - [Display(Name = "Ccc157")] + [ValueName("Ccc157"), Display(Name = "Ccc157")] Ccc157 = 157, - [Display(Name = "Ccc158")] + [ValueName("Ccc158"), Display(Name = "Ccc158")] Ccc158 = 158, - [Display(Name = "Ccc159")] + [ValueName("Ccc159"), Display(Name = "Ccc159")] Ccc159 = 159, - [Display(Name = "Ccc160")] + [ValueName("Ccc160"), Display(Name = "Ccc160")] Ccc160 = 160, - [Display(Name = "Ccc161")] + [ValueName("Ccc161"), Display(Name = "Ccc161")] Ccc161 = 161, - [Display(Name = "Ccc162")] + [ValueName("Ccc162"), Display(Name = "Ccc162")] Ccc162 = 162, - [Display(Name = "Ccc163")] + [ValueName("Ccc163"), Display(Name = "Ccc163")] Ccc163 = 163, - [Display(Name = "Ccc164")] + [ValueName("Ccc164"), Display(Name = "Ccc164")] Ccc164 = 164, - [Display(Name = "Ccc165")] + [ValueName("Ccc165"), Display(Name = "Ccc165")] Ccc165 = 165, - [Display(Name = "Ccc166")] + [ValueName("Ccc166"), Display(Name = "Ccc166")] Ccc166 = 166, - [Display(Name = "Ccc167")] + [ValueName("Ccc167"), Display(Name = "Ccc167")] Ccc167 = 167, - [Display(Name = "Ccc168")] + [ValueName("Ccc168"), Display(Name = "Ccc168")] Ccc168 = 168, - [Display(Name = "Ccc169")] + [ValueName("Ccc169"), Display(Name = "Ccc169")] Ccc169 = 169, - [Display(Name = "Ccc170")] + [ValueName("Ccc170"), Display(Name = "Ccc170")] Ccc170 = 170, - [Display(Name = "Ccc171")] + [ValueName("Ccc171"), Display(Name = "Ccc171")] Ccc171 = 171, - [Display(Name = "Ccc172")] + [ValueName("Ccc172"), Display(Name = "Ccc172")] Ccc172 = 172, - [Display(Name = "Ccc173")] + [ValueName("Ccc173"), Display(Name = "Ccc173")] Ccc173 = 173, - [Display(Name = "Ccc174")] + [ValueName("Ccc174"), Display(Name = "Ccc174")] Ccc174 = 174, - [Display(Name = "Ccc175")] + [ValueName("Ccc175"), Display(Name = "Ccc175")] Ccc175 = 175, - [Display(Name = "Ccc176")] + [ValueName("Ccc176"), Display(Name = "Ccc176")] Ccc176 = 176, - [Display(Name = "Ccc177")] + [ValueName("Ccc177"), Display(Name = "Ccc177")] Ccc177 = 177, - [Display(Name = "Ccc178")] + [ValueName("Ccc178"), Display(Name = "Ccc178")] Ccc178 = 178, - [Display(Name = "Ccc179")] + [ValueName("Ccc179"), Display(Name = "Ccc179")] Ccc179 = 179, - [Display(Name = "Ccc180")] + [ValueName("Ccc180"), Display(Name = "Ccc180")] Ccc180 = 180, - [Display(Name = "Ccc181")] + [ValueName("Ccc181"), Display(Name = "Ccc181")] Ccc181 = 181, - [Display(Name = "Ccc182")] + [ValueName("Ccc182"), Display(Name = "Ccc182")] Ccc182 = 182, - [Display(Name = "Ccc183")] + [ValueName("Ccc183"), Display(Name = "Ccc183")] Ccc183 = 183, - [Display(Name = "Ccc184")] + [ValueName("Ccc184"), Display(Name = "Ccc184")] Ccc184 = 184, - [Display(Name = "Ccc185")] + [ValueName("Ccc185"), Display(Name = "Ccc185")] Ccc185 = 185, - [Display(Name = "Ccc186")] + [ValueName("Ccc186"), Display(Name = "Ccc186")] Ccc186 = 186, - [Display(Name = "Ccc187")] + [ValueName("Ccc187"), Display(Name = "Ccc187")] Ccc187 = 187, - [Display(Name = "Ccc188")] + [ValueName("Ccc188"), Display(Name = "Ccc188")] Ccc188 = 188, - [Display(Name = "Ccc189")] + [ValueName("Ccc189"), Display(Name = "Ccc189")] Ccc189 = 189, - [Display(Name = "Ccc190")] + [ValueName("Ccc190"), Display(Name = "Ccc190")] Ccc190 = 190, - [Display(Name = "Ccc191")] + [ValueName("Ccc191"), Display(Name = "Ccc191")] Ccc191 = 191, - [Display(Name = "Ccc192")] + [ValueName("Ccc192"), Display(Name = "Ccc192")] Ccc192 = 192, - [Display(Name = "Ccc193")] + [ValueName("Ccc193"), Display(Name = "Ccc193")] Ccc193 = 193, - [Display(Name = "Ccc194")] + [ValueName("Ccc194"), Display(Name = "Ccc194")] Ccc194 = 194, - [Display(Name = "Ccc195")] + [ValueName("Ccc195"), Display(Name = "Ccc195")] Ccc195 = 195, - [Display(Name = "Ccc196")] + [ValueName("Ccc196"), Display(Name = "Ccc196")] Ccc196 = 196, - [Display(Name = "Ccc197")] + [ValueName("Ccc197"), Display(Name = "Ccc197")] Ccc197 = 197, - [Display(Name = "Ccc198")] + [ValueName("Ccc198"), Display(Name = "Ccc198")] Ccc198 = 198, - [Display(Name = "Ccc199", Description = "End of fixed position classes")] + [ValueName("Ccc199"), Display(Name = "Ccc199", Description = "End of fixed position classes")] Ccc199 = 199, - [Display(Name = "Attached_Below_Left", Description = "Marks attached at the bottom left")] + [ValueName("Attached_Below_Left"), Display(Name = "Attached_Below_Left", Description = "Marks attached at the bottom left")] AttachedBelowLeft = 200, - [Display(Name = "Attached_Below", Description = "Marks attached directly below")] + [ValueName("Attached_Below"), Display(Name = "Attached_Below", Description = "Marks attached directly below")] AttachedBelow = 202, - [Display(Name = "Attached_Below_Right", Description = "Marks attached at the bottom right")] + [ValueName("Attached_Below_Right"), Display(Name = "Attached_Below_Right", Description = "Marks attached at the bottom right")] AttachedBelowRight = 204, - [Display(Name = "Attached_Left", Description = "Marks attached to the left")] + [ValueName("Attached_Left"), Display(Name = "Attached_Left", Description = "Marks attached to the left")] AttachedLeft = 208, - [Display(Name = "Attached_Right", Description = "Marks attached to the right")] + [ValueName("Attached_Right"), Display(Name = "Attached_Right", Description = "Marks attached to the right")] AttachedRight = 210, - [Display(Name = "Attached_Above_Left", Description = "Marks attached at the top left")] + [ValueName("Attached_Above_Left"), Display(Name = "Attached_Above_Left", Description = "Marks attached at the top left")] AttachedAboveLeft = 212, - [Display(Name = "Attached_Above", Description = "Marks attached directly above")] + [ValueName("Attached_Above"), Display(Name = "Attached_Above", Description = "Marks attached directly above")] AttachedAbove = 214, - [Display(Name = "Attached_Above_Right", Description = "Marks attached at the top right")] + [ValueName("Attached_Above_Right"), Display(Name = "Attached_Above_Right", Description = "Marks attached at the top right")] AttachedAboveRight = 216, - [Display(Name = "Below_Left", Description = "Distinct marks at the bottom left")] + [ValueName("Below_Left"), Display(Name = "Below_Left", Description = "Distinct marks at the bottom left")] BelowLeft = 218, - [Display(Name = "Below", Description = "Distinct marks directly below")] + [ValueName("Below"), Display(Name = "Below", Description = "Distinct marks directly below")] Below = 220, - [Display(Name = "Below_Right", Description = "Distinct marks at the bottom right")] + [ValueName("Below_Right"), Display(Name = "Below_Right", Description = "Distinct marks at the bottom right")] BelowRight = 222, - [Display(Name = "Left", Description = "Distinct marks to the left")] + [ValueName("Left"), Display(Name = "Left", Description = "Distinct marks to the left")] Left = 224, - [Display(Name = "Right", Description = "Distinct marks to the right")] + [ValueName("Right"), Display(Name = "Right", Description = "Distinct marks to the right")] Right = 226, - [Display(Name = "Above_Left", Description = "Distinct marks at the top left")] + [ValueName("Above_Left"), Display(Name = "Above_Left", Description = "Distinct marks at the top left")] AboveLeft = 228, - [Display(Name = "Above", Description = "Distinct marks directly above")] + [ValueName("Above"), Display(Name = "Above", Description = "Distinct marks directly above")] Above = 230, - [Display(Name = "Above_Right", Description = "Distinct marks at the top right")] + [ValueName("Above_Right"), Display(Name = "Above_Right", Description = "Distinct marks at the top right")] AboveRight = 232, - [Display(Name = "Double_Below", Description = "Distinct marks subtending two bases")] + [ValueName("Double_Below"), Display(Name = "Double_Below", Description = "Distinct marks subtending two bases")] DoubleBelow = 233, - [Display(Name = "Double_Above", Description = "Distinct marks extending above two bases")] + [ValueName("Double_Above"), Display(Name = "Double_Above", Description = "Distinct marks extending above two bases")] DoubleAbove = 234, - [Display(Name = "Iota_Subscript", Description = "Greek iota subscript only")] + [ValueName("Iota_Subscript"), Display(Name = "Iota_Subscript", Description = "Greek iota subscript only")] IotaSubscript = 240, } } diff --git a/UnicodeInformation/ContributoryProperties.cs b/UnicodeInformation/ContributoryProperties.cs index c938c9c..4c9663b 100644 --- a/UnicodeInformation/ContributoryProperties.cs +++ b/UnicodeInformation/ContributoryProperties.cs @@ -10,69 +10,69 @@ namespace UnicodeInformation [Flags] public enum ContributoryProperties : int { - [Display(Name = "ASCII_Hex_Digit", Description = "ASCII characters commonly used for the representation of hexadecimal numbers.")] - ASCIIHexDigit = 0x00000001, - [Display(Name = "Bidi_Control", Description = "Format control characters which have specific functions in the Unicode Bidirectional Algorithm [UAX9].")] + [ValueName("ASCII_Hex_Digit"), Display(Name = "ASCII_Hex_Digit", Description = "ASCII characters commonly used for the representation of hexadecimal numbers.")] + AsciiHexDigit = 0x00000001, + [ValueName("Bidi_Control"), Display(Name = "Bidi_Control", Description = "Format control characters which have specific functions in the Unicode Bidirectional Algorithm [UAX9].")] BidiControl = 0x00000002, - [Display(Name = "Dash", Description = "Punctuation characters explicitly called out as dashes in the Unicode Standard, plus their compatibility equivalents. Most of these have the General_Category value Pd, but some have the General_Category value Sm because of their use in mathematics.")] + [ValueName("Dash"), Display(Name = "Dash", Description = "Punctuation characters explicitly called out as dashes in the Unicode Standard, plus their compatibility equivalents. Most of these have the General_Category value Pd, but some have the General_Category value Sm because of their use in mathematics.")] Dash = 0x00000004, - [Display(Name = "Deprecated", Description = "For a machine-readable list of deprecated characters. No characters will ever be removed from the standard, but the usage of deprecated characters is strongly discouraged.")] + [ValueName("Deprecated"), Display(Name = "Deprecated", Description = "For a machine-readable list of deprecated characters. No characters will ever be removed from the standard, but the usage of deprecated characters is strongly discouraged.")] Deprecated = 0x00000008, - [Display(Name = "Diacritic", Description = "Characters that linguistically modify the meaning of another character to which they apply. Some diacritics are not combining characters, and some combining characters are not diacritics.")] + [ValueName("Diacritic"), Display(Name = "Diacritic", Description = "Characters that linguistically modify the meaning of another character to which they apply. Some diacritics are not combining characters, and some combining characters are not diacritics.")] Diacritic = 0x00000010, - [Display(Name = "Extender", Description = "Characters whose principal function is to extend the value or shape of a preceding alphabetic character. Typical of these are length and iteration marks.")] + [ValueName("Extender"), Display(Name = "Extender", Description = "Characters whose principal function is to extend the value or shape of a preceding alphabetic character. Typical of these are length and iteration marks.")] Extender = 0x00000020, - [Display(Name = "Hex_Digit", Description = "Characters commonly used for the representation of hexadecimal numbers, plus their compatibility equivalents.")] + [ValueName("Hex_Digit"), Display(Name = "Hex_Digit", Description = "Characters commonly used for the representation of hexadecimal numbers, plus their compatibility equivalents.")] HexDigit = 0x00000040, - [Display(Name = "Hyphen", Description = "Dashes which are used to mark connections between pieces of words, plus the Katakana middle dot. The Katakana middle dotfunctions like a hyphen, but is shaped like a dot rather than a dash.")] + [ValueName("Hyphen"), Display(Name = "Hyphen", Description = "Dashes which are used to mark connections between pieces of words, plus the Katakana middle dot. The Katakana middle dotfunctions like a hyphen, but is shaped like a dot rather than a dash.")] Hyphen = 0x00000080, - [Display(Name = "Ideographic", Description = "Characters considered to be CJKV (Chinese, Japanese, Korean, and Vietnamese) ideographs. This property roughly defines the class of \"Chinese characters\" and does not include characters of other logographic scripts such as Cuneiform or Egyptian Hieroglyphs.")] + [ValueName("Ideographic"), Display(Name = "Ideographic", Description = "Characters considered to be CJKV (Chinese, Japanese, Korean, and Vietnamese) ideographs. This property roughly defines the class of \"Chinese characters\" and does not include characters of other logographic scripts such as Cuneiform or Egyptian Hieroglyphs.")] Ideographic = 0x00000100, - [Display(Name = "IDS_Binary_Operator", Description = "Used in Ideographic Description Sequences.")] - IDSBinaryOperator = 0x00000200, - [Display(Name = "IDS_Trinary_Operator", Description = "Used in Ideographic Description Sequences.")] - IDSTrinaryOperator = 0x00000400, - [Display(Name = "Join_Control", Description = "Format control characters which have specific functions for control of cursive joining and ligation.")] + [ValueName("IDS_Binary_Operator"), Display(Name = "IDS_Binary_Operator", Description = "Used in Ideographic Description Sequences.")] + IdsBinaryOperator = 0x00000200, + [ValueName("IDS_Trinary_Operator"), Display(Name = "IDS_Trinary_Operator", Description = "Used in Ideographic Description Sequences.")] + IdsTrinaryOperator = 0x00000400, + [ValueName("Join_Control"), Display(Name = "Join_Control", Description = "Format control characters which have specific functions for control of cursive joining and ligation.")] JoinControl = 0x00000800, - [Display(Name = "Logical_Order_Exception", Description = "A small number of spacing vowel letters occurring in certain Southeast Asian scripts such as Thai and Lao, which use a visual order display model. These letters are stored in text ahead of syllable-initial consonants, and require special handling for processes such as searching and sorting.")] + [ValueName("Logical_Order_Exception"), Display(Name = "Logical_Order_Exception", Description = "A small number of spacing vowel letters occurring in certain Southeast Asian scripts such as Thai and Lao, which use a visual order display model. These letters are stored in text ahead of syllable-initial consonants, and require special handling for processes such as searching and sorting.")] LogicalOrderException = 0x00001000, - [Display(Name = "Noncharacter_Code_Point", Description = "Code points permanently reserved for internal use.")] - NoncharacterCodePoint = 0x00002000, - [Display(Name = "Other_Alphabetic", Description = "Used in deriving the Alphabetic property.")] + [ValueName("Noncharacter_Code_Point"), Display(Name = "Noncharacter_Code_Point", Description = "Code points permanently reserved for internal use.")] + NonCharacterCodePoint = 0x00002000, + [ValueName("Other_Alphabetic"), Display(Name = "Other_Alphabetic", Description = "Used in deriving the Alphabetic property.")] OtherAlphabetic = 0x00004000, - [Display(Name = "Other_Default_Ignorable_Code_Point", Description = "Used in deriving the Default_Ignorable_Code_Point property.")] + [ValueName("Other_Default_Ignorable_Code_Point"), Display(Name = "Other_Default_Ignorable_Code_Point", Description = "Used in deriving the Default_Ignorable_Code_Point property.")] OtherDefaultIgnorableCodePoint = 0x00008000, - [Display(Name = "Other_Grapheme_Extend", Description = "Used in deriving  the Grapheme_Extend property.")] + [ValueName("Other_Grapheme_Extend"), Display(Name = "Other_Grapheme_Extend", Description = "Used in deriving  the Grapheme_Extend property.")] OtherGraphemeExtend = 0x00010000, - [Display(Name = "Other_ID_Continue", Description = "Used to maintain backward compatibility of ID_Continue.")] - OtherIDContinue = 0x00020000, - [Display(Name = "Other_ID_Start", Description = "Used to maintain backward compatibility of ID_Start.")] - OtherIDStart = 0x00040000, - [Display(Name = "Other_Lowercase", Description = "Used in deriving the Lowercase property.")] + [ValueName("Other_ID_Continue"), Display(Name = "Other_ID_Continue", Description = "Used to maintain backward compatibility of ID_Continue.")] + OtherIdContinue = 0x00020000, + [ValueName("Other_ID_Start"), Display(Name = "Other_ID_Start", Description = "Used to maintain backward compatibility of ID_Start.")] + OtherIdStart = 0x00040000, + [ValueName("Other_Lowercase"), Display(Name = "Other_Lowercase", Description = "Used in deriving the Lowercase property.")] OtherLowercase = 0x00080000, - [Display(Name = "Other_Math", Description = "Used in deriving the Math property.")] + [ValueName("Other_Math"), Display(Name = "Other_Math", Description = "Used in deriving the Math property.")] OtherMath = 0x00100000, - [Display(Name = "Other_Uppercase", Description = "Used in deriving the Uppercase property.")] + [ValueName("Other_Uppercase"), Display(Name = "Other_Uppercase", Description = "Used in deriving the Uppercase property.")] OtherUppercase = 0x00200000, - [Display(Name = "Pattern_Syntax", Description = "Used for pattern syntax as described in Unicode Standard Annex #31, \"Unicode Identifier and Pattern Syntax\" [UAX31].")] + [ValueName("Pattern_Syntax"), Display(Name = "Pattern_Syntax", Description = "Used for pattern syntax as described in Unicode Standard Annex #31, \"Unicode Identifier and Pattern Syntax\" [UAX31].")] PatternSyntax = 0x00400000, - [Display(Name = "Pattern_White_Space")] + [ValueName("Pattern_White_Space"), Display(Name = "Pattern_White_Space")] PatternWhiteSpace = 0x00800000, - [Display(Name = "Quotation_Mark", Description = "Punctuation characters that function as quotation marks.")] + [ValueName("Quotation_Mark"), Display(Name = "Quotation_Mark", Description = "Punctuation characters that function as quotation marks.")] QuotationMark = 0x01000000, - [Display(Name = "Radical", Description = "Used in Ideographic Description Sequences.")] + [ValueName("Radical"), Display(Name = "Radical", Description = "Used in Ideographic Description Sequences.")] Radical = 0x02000000, - [Display(Name = "Soft_Dotted", Description = "Characters with a \"soft dot\", like i or j. An accent placed on these characters causes the dot to disappear. An explicit dot abovecan be added where required, such as in Lithuanian.")] + [ValueName("Soft_Dotted"), Display(Name = "Soft_Dotted", Description = "Characters with a \"soft dot\", like i or j. An accent placed on these characters causes the dot to disappear. An explicit dot abovecan be added where required, such as in Lithuanian.")] SoftDotted = 0x04000000, - [Display(Name = "STerm", Description = "Sentence Terminal. Used in Unicode Standard Annex #29, \"Unicode Text Segmentation\" [UAX29].")] - STerm = 0x08000000, - [Display(Name = "Terminal_Punctuation", Description = "Punctuation characters that generally mark the end of textual units.")] + [ValueName("STerm"), Display(Name = "STerm", Description = "Sentence Terminal. Used in Unicode Standard Annex #29, \"Unicode Text Segmentation\" [UAX29].")] + SequenceTerminal = 0x08000000, + [ValueName("Terminal_Punctuation"), Display(Name = "Terminal_Punctuation", Description = "Punctuation characters that generally mark the end of textual units.")] TerminalPunctuation = 0x10000000, - [Display(Name = "Unified_Ideograph", Description = "A property which specifies the exact set of Unified CJK Ideographs in the standard. This set excludes CJK Compatibility Ideographs (which have canonical decompositions to Unified CJK Ideographs), as well as characters from the CJK Symbols and Punctuation block. The property is used in the definition of Ideographic Description Sequences.")] + [ValueName("Unified_Ideograph"), Display(Name = "Unified_Ideograph", Description = "A property which specifies the exact set of Unified CJK Ideographs in the standard. This set excludes CJK Compatibility Ideographs (which have canonical decompositions to Unified CJK Ideographs), as well as characters from the CJK Symbols and Punctuation block. The property is used in the definition of Ideographic Description Sequences.")] UnifiedIdeograph = 0x20000000, - [Display(Name = "Variation_Selector", Description = "Indicates characters that are Variation Selectors. For details on the behavior of these characters, seeStandardizedVariants.html, Section 23.4, Variation Selectors in [Unicode], and Unicode Technical Standard #37, \"Unicode Ideographic Variation Database\" [UTS37].")] + [ValueName("Variation_Selector"), Display(Name = "Variation_Selector", Description = "Indicates characters that are Variation Selectors. For details on the behavior of these characters, seeStandardizedVariants.html, Section 23.4, Variation Selectors in [Unicode], and Unicode Technical Standard #37, \"Unicode Ideographic Variation Database\" [UTS37].")] VariationSelector = 0x40000000, - [Display(Name = "White_Space", Description = "Spaces, separator characters and other control characters which should be treated by programming languages as \"white space\" for the purpose of parsing elements. See also Line_Break, Grapheme_Cluster_Break, Sentence_Break, and Word_Break, which classify space characters and related controls somewhat differently for particular text segmentation contexts.")] - WhiteSpace = -0x7FFFFFFF, + [ValueName("White_Space"), Display(Name = "White_Space", Description = "Spaces, separator characters and other control characters which should be treated by programming languages as \"white space\" for the purpose of parsing elements. See also Line_Break, Grapheme_Cluster_Break, Sentence_Break, and Word_Break, which classify space characters and related controls somewhat differently for particular text segmentation contexts.")] + WhiteSpace = ~0x7FFFFFFF, } } diff --git a/UnicodeInformation/EnumHelper.cs b/UnicodeInformation/EnumHelper.cs index ab7aabc..c8054fe 100644 --- a/UnicodeInformation/EnumHelper.cs +++ b/UnicodeInformation/EnumHelper.cs @@ -22,10 +22,10 @@ namespace UnicodeInformation return ( from field in type.DeclaredFields - let attr = field.GetCustomAttribute() - where attr != null && attr.Name != null + from attr in field.GetCustomAttributes() + where attr.Name != null select new KeyValuePair(attr.Name, (T)field.GetValue(null)) - ).ToDictionary(kvp => kvp.Key, kvp => kvp.Value); + ).ToDictionary(kvp => kvp.Key, kvp => kvp.Value, StringComparer.OrdinalIgnoreCase); } public static bool TryGetNamedValue(string name, out T value) diff --git a/UnicodeInformation/UnicodeCharacterData.cs b/UnicodeInformation/UnicodeCharacterData.cs index 20c7ff3..4cf9db5 100644 --- a/UnicodeInformation/UnicodeCharacterData.cs +++ b/UnicodeInformation/UnicodeCharacterData.cs @@ -9,11 +9,11 @@ namespace UnicodeInformation { public sealed class UnicodeCharacterData { - public readonly int CodePoint; - public readonly string Name; + public readonly UnicodeCharacterRange CodePointRange; + private readonly string name; public readonly UnicodeCategory Category; public readonly CanonicalCombiningClass CanonicalCombiningClass; - public readonly string BidirectionalClass; + public readonly BidirectionalClass BidirectionalClass; public readonly string DecompositionType; public readonly UnicodeNumericType NumericType; public readonly UnicodeRationalNumber NumericValue; @@ -28,11 +28,11 @@ namespace UnicodeInformation internal UnicodeCharacterData ( - int codePoint, + UnicodeCharacterRange codePointRange, string name, UnicodeCategory category, CanonicalCombiningClass canonicalCombiningClass, - string bidirectionalClass, + BidirectionalClass bidirectionalClass, string decompositionType, UnicodeNumericType numericType, UnicodeRationalNumber numericValue, @@ -45,8 +45,8 @@ namespace UnicodeInformation int[] relatedCodePoints ) { - this.CodePoint = codePoint; - this.Name = name; + this.CodePointRange = codePointRange; + this.name = name; this.Category = category; this.CanonicalCombiningClass = canonicalCombiningClass; this.BidirectionalClass = bidirectionalClass; @@ -61,5 +61,9 @@ namespace UnicodeInformation this.ContributoryProperties = contributoryProperties; this.RelatedCodePoints = relatedCodePoints; } + + public bool IsRange { get { return CodePointRange.FirstCodePoint != CodePointRange.LastCodePoint; } } + + public string Name { get { return !IsRange ? name : null; } } } } diff --git a/UnicodeInformation/UnicodeCharacterDataBuilder.cs b/UnicodeInformation/UnicodeCharacterDataBuilder.cs index 599636f..aa8627c 100644 --- a/UnicodeInformation/UnicodeCharacterDataBuilder.cs +++ b/UnicodeInformation/UnicodeCharacterDataBuilder.cs @@ -9,11 +9,11 @@ namespace UnicodeInformation { public sealed class UnicodeCharacterDataBuilder { - private readonly int codePoint; + private readonly UnicodeCharacterRange codePointRange; private string name; private UnicodeCategory category = UnicodeCategory.OtherNotAssigned; private CanonicalCombiningClass canonicalCombiningClass; - private string bidirectionalClass; + private BidirectionalClass bidirectionalClass; private string decompositionType; private UnicodeNumericType numericType; private UnicodeRationalNumber numericValue; @@ -26,7 +26,7 @@ namespace UnicodeInformation private List relatedCodePoints = new List(); - public int CodePoint { get { return codePoint; } } + public UnicodeCharacterRange CodePointRange { get { return codePointRange; } } public string Name { @@ -53,7 +53,7 @@ namespace UnicodeInformation set { canonicalCombiningClass = value; } // Even values not defined in the enum are allowed here. } - public string BidirectionalClass + public BidirectionalClass BidirectionalClass { get { return bidirectionalClass; } set { bidirectionalClass = value; } @@ -116,15 +116,21 @@ namespace UnicodeInformation public ICollection RelatedCodePoints { get { return relatedCodePoints; } } public UnicodeCharacterDataBuilder(int codePoint) + : this(new UnicodeCharacterRange(codePoint)) { - this.codePoint = codePoint; + } + + public UnicodeCharacterDataBuilder(UnicodeCharacterRange codePointRange) + { + this.codePointRange = codePointRange; + this.category = UnicodeCategory.OtherNotAssigned; } public UnicodeCharacterData ToCharacterData() { return new UnicodeCharacterData ( - codePoint, + codePointRange, Name, category, canonicalCombiningClass, diff --git a/UnicodeInformation/UnicodeCharacterRange.cs b/UnicodeInformation/UnicodeCharacterRange.cs index 5adee1f..dba9ad5 100644 --- a/UnicodeInformation/UnicodeCharacterRange.cs +++ b/UnicodeInformation/UnicodeCharacterRange.cs @@ -1,4 +1,5 @@ using System; +using System.Collections; using System.Collections.Generic; using System.Globalization; using System.Linq; @@ -7,8 +8,32 @@ using System.Threading.Tasks; namespace UnicodeInformation { - public struct UnicodeCharacterRange + public struct UnicodeCharacterRange : IEnumerable { + public struct Enumerator : IEnumerator + { + private readonly int start; + private readonly int end; + private int index; + + internal Enumerator(int start, int end) + { + this.start = start; + this.end = end; + this.index = start - 1; + } + + public int Current { get { return index; } } + + object IEnumerator.Current { get { return index; } } + + void IDisposable.Dispose() { } + + public bool MoveNext() { return index < end && ++index == index; } + + void IEnumerator.Reset() { index = start - 1; } + } + public readonly int FirstCodePoint; public readonly int LastCodePoint; @@ -29,6 +54,16 @@ namespace UnicodeInformation LastCodePoint = lastCodePoint; } + public bool Contains(int i) + { + return i >= FirstCodePoint & i <= LastCodePoint; + } + + internal int CompareCodePoint(int codePoint) + { + return FirstCodePoint <= codePoint ? LastCodePoint < codePoint ? 1 : 0 : -1; + } + public override string ToString() { return FirstCodePoint == LastCodePoint ? FirstCodePoint.ToString("X4") : FirstCodePoint.ToString("X4") + ".." + LastCodePoint.ToString("X4"); @@ -53,5 +88,9 @@ namespace UnicodeInformation return new UnicodeCharacterRange(start, end); } + + public Enumerator GetEnumerator() { return new Enumerator(FirstCodePoint, LastCodePoint); } + IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } + IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } } } diff --git a/UnicodeInformation/UnicodeDataBuilder.cs b/UnicodeInformation/UnicodeDataBuilder.cs new file mode 100644 index 0000000..98d0560 --- /dev/null +++ b/UnicodeInformation/UnicodeDataBuilder.cs @@ -0,0 +1,133 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace UnicodeInformation +{ + public class UnicodeDataBuilder + { + private readonly Version unicodeVersion; + private UnicodeCharacterDataBuilder[] characterDataBuilders = new UnicodeCharacterDataBuilder[10000]; + private int characterCount; + + public UnicodeDataBuilder(Version unicodeVersion) + { + this.unicodeVersion = unicodeVersion; + } + + private int FindCodePoint(int codePoint) + { + if (characterCount == 0) return -1; + + int minIndex = 0; + int maxIndex = characterCount - 1; + + do + { + int index = (minIndex + maxIndex) >> 1; + + int Δ = characterDataBuilders[index].CodePointRange.CompareCodePoint(codePoint); + + if (Δ == 0) return index; + else if (Δ < 0) maxIndex = index - 1; + else minIndex = index + 1; + } while (minIndex <= maxIndex); + + return -1; + } + + private int FindInsertionPoint(int startCodePoint, int endCodePoint) + { + int minIndex; + int maxIndex; + + if (characterCount == 0 || characterDataBuilders[maxIndex = characterCount - 1].CodePointRange.LastCodePoint < startCodePoint) return characterCount; + else if (endCodePoint < characterDataBuilders[minIndex = 0].CodePointRange.FirstCodePoint) return 0; + else if (characterCount == 1) return -1; + + do + { + int index = (minIndex + maxIndex) >> 1; + + int Δ = characterDataBuilders[index].CodePointRange.CompareCodePoint(startCodePoint); + + if (Δ == 0) return -1; + else if (Δ < 0) maxIndex = index; + else minIndex = index; + } while (maxIndex - minIndex > 1); + + if (characterDataBuilders[maxIndex].CodePointRange.FirstCodePoint < endCodePoint) return -1; + else return maxIndex; + } + + public void Insert(UnicodeCharacterDataBuilder data) + { + int insertionPoint = FindInsertionPoint(data.CodePointRange.FirstCodePoint, data.CodePointRange.LastCodePoint); + + if (insertionPoint < 0) throw new InvalidOperationException("The specified range overlaps with pre-existing ranges."); + + if (insertionPoint >= characterDataBuilders.Length) + { + Array.Resize(ref characterDataBuilders, characterDataBuilders.Length << 1); + } + + if (insertionPoint < characterCount) + { + Array.Copy(characterDataBuilders, insertionPoint, characterDataBuilders, insertionPoint + 1, characterCount - insertionPoint); + } + + characterDataBuilders[insertionPoint] = data; + ++characterCount; + } + + public UnicodeCharacterDataBuilder Get(int codePoint) + { + int index = FindCodePoint(codePoint); + + return index >= 0 ? characterDataBuilders[index] : null; + } + + public void SetProperties(ContributoryProperties property, UnicodeCharacterRange codePointRange) + { + int firstIndex = FindCodePoint(codePointRange.FirstCodePoint); + int lastIndex = FindCodePoint(codePointRange.LastCodePoint); + + if (firstIndex < 0 && lastIndex < 0) + { + Insert(new UnicodeCharacterDataBuilder(codePointRange) { ContributoryProperties = property }); + return; + } + + if (firstIndex < 0 + || lastIndex < 0 + || characterDataBuilders[firstIndex].CodePointRange.FirstCodePoint < codePointRange.FirstCodePoint + || characterDataBuilders[lastIndex].CodePointRange.LastCodePoint > codePointRange.LastCodePoint) + { + throw new InvalidOperationException(); + } + + int i = firstIndex; + + while (true) + { + characterDataBuilders[i].ContributoryProperties |= property; + + if (i == lastIndex) break; + + ++i; + } + } + + public UnicodeData ToUnicodeData() + { + var finalData = new UnicodeCharacterData[characterCount]; + + for (int i = 0; i < finalData.Length; ++i) + finalData[i] = characterDataBuilders[i].ToCharacterData(); + + return new UnicodeData(unicodeVersion, finalData); + } + } +} diff --git a/UnicodeInformation/UnicodeDataManager.cs b/UnicodeInformation/UnicodeDataManager.cs index 4a74db0..4ddc433 100644 --- a/UnicodeInformation/UnicodeDataManager.cs +++ b/UnicodeInformation/UnicodeDataManager.cs @@ -13,55 +13,109 @@ namespace UnicodeInformation public const string UnicodeDataFileName = "UnicodeData.txt"; public const string PropListFileName = "PropList.txt"; + private static string ParseSimpleCaseMapping(string mapping) + { + if (string.IsNullOrEmpty(mapping)) return null; + + return char.ConvertFromUtf32(int.Parse(mapping, NumberStyles.HexNumber)); + } + + private static string NullIfEmpty(string s) + { + return string.IsNullOrEmpty(s) ? null : s; + } + public static async Task DownloadAndBuildDataAsync(IUcdSource ucdSource) { - var characterDataBuilders = new List(); + var builder = new UnicodeDataBuilder(new Version(7, 0)); using (var reader = new UnicodeDataFileReader(await ucdSource.OpenDataFileAsync(UnicodeDataFileName).ConfigureAwait(false))) { + int rangeStartCodePoint = -1; + while (reader.MoveToNextLine()) { - // NB: Fields 10 and 11 are deemed obsolete. Field 11 should always be empty, and will be ignored here. - var characterData = new UnicodeCharacterDataBuilder(int.Parse(reader.ReadField(), NumberStyles.HexNumber)) + var codePoint = new UnicodeCharacterRange(int.Parse(reader.ReadField(), NumberStyles.HexNumber)); + + string name = reader.ReadField(); + + if (!string.IsNullOrEmpty(name) && name[0] == '<' && name[name.Length - 1] == '>') { - Name = reader.ReadField(), + if (name.EndsWith(", First>", StringComparison.OrdinalIgnoreCase)) + { + if (rangeStartCodePoint >= 0) throw new InvalidDataException("Invalid range data in UnicodeData.txt."); + + rangeStartCodePoint = codePoint.FirstCodePoint; + + continue; + } + else if (name.EndsWith(", Last>", StringComparison.OrdinalIgnoreCase)) + { + if (rangeStartCodePoint < 0) throw new InvalidDataException("Invalid range data in UnicodeData.txt."); + + codePoint = new UnicodeCharacterRange(rangeStartCodePoint, codePoint.LastCodePoint); + + name = name.Substring(1, name.Length - 8); + + rangeStartCodePoint = -1; + } + } + else if (rangeStartCodePoint >= 0) + { + throw new InvalidDataException("Invalid range data in UnicodeData.txt."); + } + + // NB: Fields 10 and 11 are deemed obsolete. Field 11 should always be empty, and will be ignored here. + var characterData = new UnicodeCharacterDataBuilder(codePoint) + { + Name = NullIfEmpty(name), Category = UnicodeCategoryInfo.FromShortName(reader.ReadField()).Category, CanonicalCombiningClass = (CanonicalCombiningClass)byte.Parse(reader.ReadField()), - BidirectionalClass = reader.ReadField(), - DecompositionType = reader.ReadField() }; - string numericDecimalField = reader.ReadField(); - string numericDigitField = reader.ReadField(); - string numericNumericField = reader.ReadField(); + BidirectionalClass bidirectionalClass; + if (EnumHelper.TryGetNamedValue(reader.ReadField(), out bidirectionalClass)) + { + characterData.BidirectionalClass = bidirectionalClass; + } + else + { + throw new InvalidDataException(string.Format("Missing Bidi_Class property for code point(s) {0}.", codePoint)); + } + + characterData.DecompositionType = NullIfEmpty(reader.ReadField()); + + string numericDecimalField = NullIfEmpty(reader.ReadField()); + string numericDigitField = NullIfEmpty(reader.ReadField()); + string numericNumericField = NullIfEmpty(reader.ReadField()); characterData.BidirectionalMirrored = reader.ReadField() == "Y"; - characterData.OldName = reader.ReadField(); + characterData.OldName = NullIfEmpty(reader.ReadField()); reader.SkipField(); - characterData.SimpleUpperCaseMapping = reader.ReadField(); - characterData.SimpleLowerCaseMapping = reader.ReadField(); - characterData.SimpleTitleCaseMapping = reader.ReadField(); + characterData.SimpleUpperCaseMapping = ParseSimpleCaseMapping(reader.ReadField()); + characterData.SimpleLowerCaseMapping = ParseSimpleCaseMapping(reader.ReadField()); + characterData.SimpleTitleCaseMapping = ParseSimpleCaseMapping(reader.ReadField()); // Handle Numeric_Type & Numeric_Value: // If field 6 is set, fields 7 and 8 should have the same value, and Numeric_Type is Decimal. // If field 6 is not set but field 7 is set, field 8 should be set and have the same value. Then, the type is Digit. // If field 6 and 7 are not set, but field 8 is set, then Numeric_Type is Numeric. - if (!string.IsNullOrEmpty(numericNumericField)) + if (numericNumericField != null) { characterData.NumericValue = UnicodeRationalNumber.Parse(numericNumericField); - if (!string.IsNullOrEmpty(numericDigitField)) + if (numericDigitField != null) { if (numericDigitField != numericNumericField) { - throw new InvalidDataException("Invalid value for field 7 of character U+" + characterData.CodePoint.ToString("X4") + "."); + throw new InvalidDataException("Invalid value for field 7 of code point " + characterData.CodePointRange.ToString() + "."); } - if (!string.IsNullOrEmpty(numericDecimalField)) + if (numericDecimalField != null) { if (numericDecimalField != numericDigitField) { - throw new InvalidDataException("Invalid value for field 6 of character U+" + characterData.CodePoint.ToString("X4") + "."); + throw new InvalidDataException("Invalid value for field 6 of code point " + characterData.CodePointRange.ToString() + "."); } } else @@ -75,10 +129,10 @@ namespace UnicodeInformation } } - characterDataBuilders.Add(characterData); + builder.Insert(characterData); } } - /* + using (var reader = new UnicodeDataFileReader(await ucdSource.OpenDataFileAsync(PropListFileName).ConfigureAwait(false))) { while (reader.MoveToNextLine()) @@ -88,17 +142,12 @@ namespace UnicodeInformation var range = UnicodeCharacterRange.Parse(reader.ReadField().TrimEnd()); if (EnumHelper.TryGetNamedValue(reader.ReadField().Trim(), out property)) { + builder.SetProperties(property, range); } } } - */ - var finalData = new UnicodeCharacterData[characterDataBuilders.Count]; - - for (int i = 0; i < finalData.Length; ++i) - finalData[i] = characterDataBuilders[i].ToCharacterData(); - - return new UnicodeData(new Version(7, 0), finalData); + return builder.ToUnicodeData(); } } } diff --git a/UnicodeInformation/UnicodeInformation.csproj b/UnicodeInformation/UnicodeInformation.csproj index 30fbe91..eb8aeed 100644 --- a/UnicodeInformation/UnicodeInformation.csproj +++ b/UnicodeInformation/UnicodeInformation.csproj @@ -62,9 +62,11 @@ + + diff --git a/UnicodeInformation/ValueNameAttribute.cs b/UnicodeInformation/ValueNameAttribute.cs new file mode 100644 index 0000000..3672d73 --- /dev/null +++ b/UnicodeInformation/ValueNameAttribute.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace UnicodeInformation +{ + [AttributeUsage(AttributeTargets.Field, AllowMultiple = true)] + public sealed class ValueNameAttribute : Attribute + { + private readonly string name; + + public string Name { get { return name; } } + + public ValueNameAttribute(string name) + { + this.name = name; + } + } +}