From c1f5ccefbec48c9d109a494342c1e1af77fc3483 Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Mon, 3 Jun 2002 03:37:59 +0000 Subject: [PATCH] ICU-1923 upgrade to Unicode 3.2: parse CaseFolding.txt status 'T' X-SVN-Rev: 8771 --- icu4c/source/tools/genprops/genprops.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/icu4c/source/tools/genprops/genprops.c b/icu4c/source/tools/genprops/genprops.c index db65d97b04e..22e84791f5b 100644 --- a/icu4c/source/tools/genprops/genprops.c +++ b/icu4c/source/tools/genprops/genprops.c @@ -407,7 +407,7 @@ caseFoldingLineFn(void *context, /* get the status of this mapping */ caseFoldings[caseFoldingCount].status=status=*u_skipWhitespace(fields[1][0]); - if(status!='L' && status!='E' && status!='C' && status!='S' && status!='F' && status!='I') { + if(status!='L' && status!='E' && status!='C' && status!='S' && status!='F' && status!='I' && status!='T') { fprintf(stderr, "genprops: unrecognized status field in CaseFolding.txt at %s\n", fields[0][0]); *pErrorCode=U_PARSE_ERROR; exit(U_PARSE_ERROR); @@ -452,7 +452,14 @@ caseFoldingLineFn(void *context, uprv_memcpy(caseFoldings[caseFoldingCount-1].full, caseFoldings[caseFoldingCount].full, 32*U_SIZEOF_UCHAR); return; } - } else if(status=='I') { + } else if(status=='I' || status=='T') { + /* check if there was a default mapping for this code point before (remove it) */ + while(caseFoldingCount>0 && + caseFoldings[caseFoldingCount-1].code==caseFoldings[caseFoldingCount].code + ) { + prevCode=0; + --caseFoldingCount; + } /* store only a marker for special handling for cases like dotless i */ caseFoldings[caseFoldingCount].simple=0; caseFoldings[caseFoldingCount].full[0]=0;