Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Unified Diff: source/data/brkitr/line_loose_cj.txt

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/data/brkitr/line_loose.txt ('k') | source/data/brkitr/line_loose_fi.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/data/brkitr/line_loose_cj.txt
diff --git a/source/data/brkitr/line_ja.txt b/source/data/brkitr/line_loose_cj.txt
similarity index 82%
copy from source/data/brkitr/line_ja.txt
copy to source/data/brkitr/line_loose_cj.txt
index 70b203d1b0d26afae1aa80d16797c0c40be68a8b..9934fe3aa1d077407f538b8d3ba6a649fdf7622d 100644
--- a/source/data/brkitr/line_ja.txt
+++ b/source/data/brkitr/line_loose_cj.txt
@@ -1,16 +1,32 @@
-# Copyright (c) 2002-2013 International Business Machines Corporation and
+# Copyright (c) 2002-2015 International Business Machines Corporation and
# others. All Rights Reserved.
#
-# file: line_ja.txt
+# file: line_loose_cj.txt
#
# Line Breaking Rules
# Implement default line breaking as defined by
-# Unicode Standard Annex #14 Revision 29 for Unicode 6.2
+# Unicode Standard Annex #14 Revision 34 for Unicode 8.0
# 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 to correspond to CSS
+# line-break=loose (BCP47 -u-lb-loose) as defined for Chinese & Japanese.
+# It sets characters of class CJ to behave like ID.
+# In addition, it allows breaks:
+# * before hyphens 2010 & 2013 (both BA) and 301C, 30A0 (both NS)
+# * before iteration marks 3005, 303B, 309D, 309E, 30FD, 30FE (all NS)
+# * between characters of LineBreak class IN such as 2026
+# * before some centered punct 203C, 2047, 2048, 2049, 30FB, FF1A, FF1B,
+# FF65 (all NS) and FF01, FF1F (both EX).
+# * before suffix characters with LineBreak class PO and EastAsianWidth A,F,W;
+# this includes: 00B0 2030 2032 2033 2035 2103 2109 FE6A FF05 FFE0
+# * after prefix characters with LineBreak class PR and EastAsianWidth A,F,W;
+# this includes: 00A4 00B1 20AC 2116 FE69 FF04 FFE1 FFE5 FFE6
+
#
# Character Classes defined by TR 14.
@@ -58,7 +74,8 @@
$AI = [:LineBreak = Ambiguous:];
$AL = [:LineBreak = Alphabetic:];
-$BA = [:LineBreak = Break_After:];
+$BAX = [\u2010 \u2013];
+$BA = [[:LineBreak = Break_After:] - $BAX];
$BB = [:LineBreak = Break_Before:];
$BK = [:LineBreak = Mandatory_Break:];
$B2 = [:LineBreak = Break_Both:];
@@ -68,7 +85,8 @@ $CL = [:LineBreak = Close_Punctuation:];
$CM = [:LineBreak = Combining_Mark:];
$CP = [:LineBreak = Close_Parenthesis:];
$CR = [:LineBreak = Carriage_Return:];
-$EX = [:LineBreak = Exclamation:];
+$EXX = [\uFF01 \uFF1F];
+$EX = [[:LineBreak = Exclamation:] - $EXX];
$GL = [:LineBreak = Glue:];
$HL = [:LineBreak = Hebrew_Letter:];
$HY = [:LineBreak = Hyphen:];
@@ -82,11 +100,14 @@ $JV = [:LineBreak = JV:];
$JT = [:LineBreak = JT:];
$LF = [:LineBreak = Line_Feed:];
$NL = [:LineBreak = Next_Line:];
-$NS = [:LineBreak = Nonstarter:];
+$NSX = [\u301C \u30A0 \u3005 \u303B \u309D \u309E \u30FD \u30FE \u203C \u2047 \u2048 \u2049 \u30FB \uFF1A \uFF1B \uFF65];
+$NS = [[:LineBreak = Nonstarter:] - $NSX];
$NU = [:LineBreak = Numeric:];
$OP = [:LineBreak = Open_Punctuation:];
-$PO = [:LineBreak = Postfix_Numeric:];
-$PR = [:LineBreak = Prefix_Numeric:];
+$POX = [\u00B0 \u2030 \u2032 \u2033 \u2035 \u2103 \u2109 \uFE6A \uFF05 \uFFE0];
+$PO = [[:LineBreak = Postfix_Numeric:] - $POX];
+$PRX = [\u00A4 \u00B1 \u20AC \u2116 \uFE69 \uFF04 \uFFE1 \uFFE5 \uFFE6];
+$PR = [[:LineBreak = Prefix_Numeric:] - $PRX];
$QU = [:LineBreak = Quotation:];
$RI = [:LineBreak = Regional_Indicator:];
$SA = [:LineBreak = Complex_Context:];
@@ -118,11 +139,13 @@ $ALPlus = [$AL $AI $SA $SG $XX];
#
$ALcm = $ALPlus $CM*;
$BAcm = $BA $CM*;
+$BAXcm = $BAX $CM*;
$BBcm = $BB $CM*;
$B2cm = $B2 $CM*;
$CLcm = $CL $CM*;
$CPcm = $CP $CM*;
$EXcm = $EX $CM*;
+$EXXcm = $EXX $CM*;
$GLcm = $GL $CM*;
$HLcm = $HL $CM*;
$HYcm = $HY $CM*;
@@ -135,10 +158,13 @@ $JLcm = $JL $CM*;
$JVcm = $JV $CM*;
$JTcm = $JT $CM*;
$NScm = $NS $CM*;
+$NSXcm = $NSX $CM*;
$NUcm = $NU $CM*;
$OPcm = $OP $CM*;
$POcm = $PO $CM*;
+$POXcm = $POX $CM*;
$PRcm = $PR $CM*;
+$PRXcm = $PRX $CM*;
$QUcm = $QU $CM*;
$RIcm = $RI $CM*;
$SYcm = $SY $CM*;
@@ -153,11 +179,13 @@ $WJcm = $WJ $CM*;
#
$ALPlus $CM+;
$BA $CM+;
+$BAX $CM+;
$BB $CM+;
$B2 $CM+;
$CL $CM+;
$CP $CM+;
$EX $CM+;
+$EXX $CM+;
$GL $CM+;
$HL $CM+;
$HY $CM+;
@@ -170,10 +198,13 @@ $JL $CM+;
$JV $CM+;
$JT $CM+;
$NS $CM+;
+$NSX $CM+;
$NU $CM+;
$OP $CM+;
$PO $CM+;
+$POX $CM+;
$PR $CM+;
+$PRX $CM+;
$QU $CM+;
$RI $CM+;
$SY $CM+;
@@ -259,7 +290,7 @@ $GLcm $CANT_CM;
# LB 12a Do not break before NBSP and related characters ...
# [^SP BA HY] x GL
#
-[[$LB8NonBreaks] - [$SP $BA $HY]] $CM* $GLcm;
+[[$LB8NonBreaks] - [$SP $BA $BAX $HY]] $CM* $GLcm;
$CM+ GLcm;
@@ -267,6 +298,7 @@ $CM+ GLcm;
#
# LB 13 Don't break before ']' or '!' or ';' or '/', even after spaces.
#
+# Do not include $EXX here
$LB8NonBreaks $CL;
$CAN_CM $CM* $CL;
$CM+ $CL; # by rule 10, stand-alone CM behaves as AL
@@ -300,6 +332,8 @@ $OPcm $SP+ $CM+ $AL_FOLLOW?; # by rule 10, stand-alone CM behaves as AL
$QUcm $SP* $OPcm;
# LB 16
+# Do not break between closing punctuation and $NS, even with intervening spaces
+# But DO allow a break between closing punctuation and $NSX, don't include it here
($CLcm | $CPcm) $SP* $NScm;
# LB 17
@@ -332,6 +366,7 @@ $LB20NonBreaks = [$LB18NonBreaks - $CB];
# LB 21 x (BA | HY | NS)
# BB x
#
+# DO allow breaks here before $BAXcm and $NSXcm, so don't include them
$LB20NonBreaks $CM* ($BAcm | $HYcm | $NScm);
$BBcm [^$CB]; # $BB x
@@ -340,7 +375,7 @@ $BBcm $LB20NonBreaks $CM*;
# LB 21a Don't break after Hebrew + Hyphen
# HL (HY | BA) x
#
-$HLcm ($HYcm | $BAcm) [^$CB]?;
+$HLcm ($HYcm | $BAcm | $BAXcm) [^$CB]?;
# LB 21b (forward) Don't break between SY and HL
# (break between HL and SY already disallowed by LB 13 above)
@@ -349,12 +384,14 @@ $SYcm $HLcm;
# LB 22
($ALcm | $HLcm) $INcm;
$CM+ $INcm; # by rule 10, any otherwise unattached CM behaves as AL
+$EXcm $INcm;
$IDcm $INcm;
-$INcm $INcm;
+# $INcm $INcm; # delete this rule for CSS loose
$NUcm $INcm;
-# $LB 23
+# LB 23
+# Do not include $POX here
$IDcm $POcm;
$ALcm $NUcm; # includes $LB19
$HLcm $NUcm;
@@ -365,14 +402,16 @@ $NUcm $HLcm;
#
# LB 24
#
+# Do not include $PRX here
$PRcm $IDcm;
$PRcm ($ALcm | $HLcm);
-$POcm ($ALcm | $HLcm);
+($POcm | $POXcm) ($ALcm | $HLcm);
#
# LB 25 Numbers.
#
-($PRcm | $POcm)? ($OPcm | $HYcm)? $NUcm ($NUcm | $SYcm | $IScm)* ($CLcm | $CPcm)? ($PRcm | $POcm)?;
+# Here do not include $PRX at the beginning or $POX at the end
+($PRcm | $POcm | $POXcm)? ($OPcm | $HYcm)? $NUcm ($NUcm | $SYcm | $IScm)* ($CLcm | $CPcm)? ($PRcm | $PRXcm | $POcm)?;
# LB 26 Do not break a Korean syllable
#
@@ -381,6 +420,7 @@ $JLcm ($JLcm | $JVcm | $H2cm | $H3cm);
($JTcm | $H3cm) $JTcm;
# LB 27 Treat korean Syllable Block the same as ID (don't break it)
+# Do not include $POX or $PRX here
($JLcm | $JVcm | $JTcm | $H2cm | $H3cm) $INcm;
($JLcm | $JVcm | $JTcm | $H2cm | $H3cm) $POcm;
$PRcm ($JLcm | $JVcm | $JTcm | $H2cm | $H3cm);
@@ -411,11 +451,13 @@ $RIcm $RIcm;
$CM+ $ALPlus;
$CM+ $BA;
+$CM+ $BAX;
$CM+ $BB;
$CM+ $B2;
$CM+ $CL;
$CM+ $CP;
$CM+ $EX;
+$CM+ $EXX;
$CM+ $GL;
$CM+ $HL;
$CM+ $HY;
@@ -428,10 +470,13 @@ $CM+ $JL;
$CM+ $JV;
$CM+ $JT;
$CM+ $NS;
+$CM+ $NSX;
$CM+ $NU;
$CM+ $OP;
$CM+ $PO;
+$CM+ $POX;
$CM+ $PR;
+$CM+ $PRX;
$CM+ $QU;
$CM+ $RI;
$CM+ $SY;
@@ -463,7 +508,7 @@ $AL_FOLLOW $CM+ / (
# This rule is concerned about getting the second of the two <breaks> in place.
#
-[$PR ] / $CM+ [$BK $CR $LF $NL $ZW $SP {eof}];
+[$PR $PRX ] / $CM+ [$BK $CR $LF $NL $ZW $SP {eof}];
@@ -501,7 +546,7 @@ $CM* $CAN_CM $CM* $WJ;
# LB 12a
# [^SP BA HY] x GL
#
-$CM* $GL $CM* [$LB8NonBreaks-[$CM $SP $BA $HY]];
+$CM* $GL $CM* [$LB8NonBreaks-[$CM $SP $BA $BAX $HY]];
# LB 12
# GL x
@@ -511,6 +556,7 @@ $CM* $CAN_CM $CM* $GL;
# LB 13
+# Do not include $EXX here
$CL $CM+ $CAN_CM;
$CP $CM+ $CAN_CM;
$EX $CM+ $CAN_CM;
@@ -546,6 +592,7 @@ $SY $CM $SP+ $OP; # TODO: Experiment. Remove.
$CM* $OP $SP* $CM* $QU;
# LB 16
+# Don't include $NSX here
$CM* $NS $SP* $CM* ($CL | $CP);
# LB 17
@@ -571,36 +618,41 @@ $CM* $CAN_CM $CM* $QU; # QU x .
#
# LB 21
+# Don't include $BAX or $NSX here
$CM* ($BA | $HY | $NS) $CM* [$LB20NonBreaks-$CM]; # . x (BA | HY | NS)
$CM* [$LB20NonBreaks-$CM] $CM* $BB; # BB x .
[^$CB] $CM* $BB; #
# LB21a
-[^$CB] $CM* ($HY | $BA) $CM* $HL;
+[^$CB]? $CM* ($HY | $BA | $BAX) $CM* $HL;
# LB21b (reverse)
$CM* $HL $CM* $SY;
# LB 22
$CM* $IN $CM* ($ALPlus | $HL);
+$CM* $IN $CM* $EX;
$CM* $IN $CM* $ID;
-$CM* $IN $CM* $IN;
+# $CM* $IN $CM* $IN; # delete this rule for CSS loose
$CM* $IN $CM* $NU;
# LB 23
+# Do not include $POX here
$CM* $PO $CM* $ID;
$CM* $NU $CM* ($ALPlus | $HL);
$CM* ($ALPlus | $HL) $CM* $NU;
# LB 24
+# Do not include $PRX here
$CM* $ID $CM* $PR;
$CM* ($ALPlus | $HL) $CM* $PR;
-$CM* ($ALPlus | $HL) $CM* $PO;
+$CM* ($ALPlus | $HL) $CM* ($PO | $POX);
# LB 25
-($CM* ($PR | $PO))? ($CM* ($CL | $CP))? ($CM* ($NU | $IS | $SY))* $CM* $NU ($CM* ($OP | $HY))? ($CM* ($PR | $PO))?;
+# Here do not include $POX at the beginning or $PRX at the end
+($CM* ($PR | $PRX | $PO))? ($CM* ($CL | $CP))? ($CM* ($NU | $IS | $SY))* $CM* $NU ($CM* ($OP | $HY))? ($CM* ($PR | $PO | $POX))?;
# LB 26
$CM* ($H3 | $H2 | $JV | $JL) $CM* $JL;
@@ -608,6 +660,7 @@ $CM* ($JT | $JV) $CM* ($H2 | $JV);
$CM* $JT $CM* ($H3 | $JT);
# LB 27
+# Do not include $POX or $PRX here
$CM* $IN $CM* ($H3 | $H2 | $JT | $JV | $JL);
$CM* $PO $CM* ($H3 | $H2 | $JT | $JV | $JL);
$CM* ($H3 | $H2 | $JT | $JV | $JL) $CM* $PR;
@@ -647,7 +700,7 @@ $SP+ $CM* ($CL | $CP);
$SP+ $CM* $B2;
# LB 21
-$CM* ($HY | $BA) $CM* $HL;
+$CM* ($HY | $BA | $BAX) $CM* $HL;
# LB 25
($CM* ($IS | $SY))+ $CM* $NU;
@@ -669,6 +722,6 @@ $dictionary $dictionary;
# turn off rule chaining. We don't want to move more
# than necessary.
#
-[$CM $OP $QU $CL $CP $B2 $PR $HY $BA $SP $dictionary]+ [^$CM $OP $QU $CL $CP $B2 $PR $HY $BA $dictionary];
+[$CM $OP $QU $CL $CP $B2 $PR $PRX $HY $BA $BAX $SP $dictionary]+ [^$CM $OP $QU $CL $CP $B2 $PR $PRX $HY $BA $BAX $dictionary];
$dictionary $dictionary;
« no previous file with comments | « source/data/brkitr/line_loose.txt ('k') | source/data/brkitr/line_loose_fi.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698