X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/4388f060552cc537e71e957d32f35e9d75a61233..b801cf366c7671a99bdcef84d1e9c0ec64b36723:/icuSources/data/brkitr/line_fi.txt?ds=sidebyside diff --git a/icuSources/data/brkitr/line_fi.txt b/icuSources/data/brkitr/line_fi.txt index 40e82369..fd699c83 100644 --- a/icuSources/data/brkitr/line_fi.txt +++ b/icuSources/data/brkitr/line_fi.txt @@ -1,16 +1,21 @@ -# Copyright (c) 2002-2011 International Business Machines Corporation and +# Copyright (c) 2002-2015 International Business Machines Corporation and # others. All Rights Reserved. # # file: line_fi.txt # # Line Breaking Rules # Implement default line breaking as defined by -# Unicode Standard Annex #14 Revision 28 for Unicode 6.1 +# Unicode Standard Annex #14 Revision 29 for Unicode 6.2 # http://www.unicode.org/reports/tr14/ +# tailored as noted in 2nd paragraph below.. # # TODO: Rule LB 8 remains as it was in Unicode 5.2 # This is only because of a limitation of ICU break engine implementation, # not because the older behavior is desirable. +# +# This tailors the line break behavior for Finnish, while otherwise behaving +# per UAX 14 which corresponds to CSS line-break=strict (BCP47 -u-lb-strict). +# It sets characters of class CJ to behave like NS. # # Character Classes defined by TR 14. @@ -89,6 +94,7 @@ $OP = [:LineBreak = Open_Punctuation:]; $PO = [:LineBreak = Postfix_Numeric:]; $PR = [:LineBreak = Prefix_Numeric:]; $QU = [:LineBreak = Quotation:]; +$RI = [:LineBreak = Regional_Indicator:]; $SA = [:LineBreak = Complex_Context:]; $SG = [:LineBreak = Surrogate:]; $SP = [:LineBreak = Space:]; @@ -97,6 +103,15 @@ $WJ = [:LineBreak = Word_Joiner:]; $XX = [:LineBreak = Unknown:]; $ZW = [:LineBreak = ZWSpace:]; +# Special character classes for people & body part emoji: +# Subsets of $CM: +$ZWJ = \u200D; +$EmojiVar = \uFE0F; +# The following are subsets of $ID +$EmojiForSeqs = [\u2764 \U0001F441 \U0001F466-\U0001F469 \U0001F48B \U0001F5E8]; +$EmojiForMods = [\u261D \u26F9 \u270A-\u270D \U0001F385 \U0001F3C3-\U0001F3C4 \U0001F3C7 \U0001F3CA-\U0001F3CB \U0001F442-\U0001F443 \U0001F446-\U0001F450 \U0001F466-\U0001F469 \U0001F46E-\U0001F478 \U0001F47C \U0001F481-\U0001F483 \U0001F485-\U0001F487 \U0001F4AA \U0001F590 \U0001F595 \U0001F596 \U0001F645-\U0001F647 \U0001F64B-\U0001F64F \U0001F6A3 \U0001F6B4-\U0001F6B6 \U0001F6C0 \U0001F918]; +$EmojiMods = [\U0001F3FB-\U0001F3FF]; + # Dictionary character set, for triggering language-based break engines. Currently # limited to LineBreak=Complex_Context. Note that this set only works in Unicode # 5.0 or later as the definition of Complex_Context was corrected to include all @@ -141,6 +156,7 @@ $OPcm = $OP $CM*; $POcm = $PO $CM*; $PRcm = $PR $CM*; $QUcm = $QU $CM*; +$RIcm = $RI $CM*; $SYcm = $SY $CM*; $WJcm = $WJ $CM*; @@ -176,6 +192,7 @@ $OP $CM+; $PO $CM+; $PR $CM+; $QU $CM+; +$RI $CM+; $SY $CM+; $WJ $CM+; @@ -231,6 +248,10 @@ $LB8Breaks = [$LB4Breaks $ZW]; $LB8NonBreaks = [[$LB4NonBreaks] - [$ZW]]; +# Special forward rule for people & body part emoji: +# don't break $ZWJ from subsequent $EmojiForSeqs +$EmojiForSeqs $EmojiVar? $EmojiMods? $ZWJ $EmojiForSeqs; + # LB 9 Combining marks. X $CM needs to behave like X, where X is not $SP, $BK $CR $LF $NL # $CM not covered by the above needs to behave like $AL # See definition of $CAN_CM. @@ -345,6 +366,10 @@ $BBcm $LB20NonBreaks $CM*; # $HLcm ($HYcm | $BAcm | $HHcm) [^$CB]?; +# LB 21b (forward) Don't break between SY and HL +# (break between HL and SY already disallowed by LB 13 above) +$SYcm $HLcm; + # LB 22 ($ALcm | $HLcm) $INcm; $CM+ $INcm; # by rule 10, any otherwise unattached CM behaves as AL @@ -398,6 +423,12 @@ $IScm ($ALcm | $HLcm); $CM+ $OPcm; # The $CM+ is from rule 10, an unattached CM is treated as AL. $CPcm ($ALcm | $HLcm | $NUcm); +# LB 30a Do not break between regional indicators. +$RIcm $RIcm; + +# Special forward rule for people & body part emoji: +# don't break between relevant emoji and $EmojiMods +$EmojiForMods $EmojiVar? $EmojiMods; # # Reverse Rules. @@ -431,6 +462,7 @@ $CM+ $OP; $CM+ $PO; $CM+ $PR; $CM+ $QU; +$CM+ $RI; $CM+ $SY; $CM+ $WJ; $CM+; @@ -481,6 +513,10 @@ $LF $CR; # Requires an engine enhancement. # / $SP* $ZW +# Special reverse rule for people & body part emoji: +# don't break $ZWJ from subsequent $EmojiForSeqs +$EmojiForSeqs $ZWJ $EmojiMods? $EmojiVar? $EmojiForSeqs; + # LB 9,10 Combining marks. # X $CM needs to behave like X, where X is not $SP or controls. # $CM not covered by the above needs to behave like $AL @@ -579,6 +615,8 @@ $CM* [$LB20NonBreaks-$CM] $CM* $BB; # BB x . # LB21a [^$CB] $CM* ($HY | $BA | $HH) $CM* $HL; +# LB21b (reverse) +$CM* $HL $CM* $SY; # LB 22 $CM* $IN $CM* ($ALPlus | $HL); @@ -621,6 +659,12 @@ $CM* ($ALPlus | $HL) $CM* $IS; $CM* $OP $CM* ($ALPlus | $HL | $NU); $CM* ($ALPlus | $HL | $NU) $CM* $CP; +# LB 30a +$CM* $RI $CM* $RI; + +# Special reverse rule for people & body part emoji: +# don't break between relevant emoji and $EmojiMods +$EmojiMods $EmojiVar? $EmojiForMods; ## -------------------------------------------------