ICU-2569 fix makeconv bugs for .ucm error checking

X-SVN-Rev: 11520
This commit is contained in:
Markus Scherer 2003-04-11 21:05:50 +00:00
parent 1bba328280
commit a6a7a302bf
2 changed files with 9 additions and 3 deletions

View File

@ -929,14 +929,14 @@ MBCSSingleAddFromUnicode(NewConverter *cnvData,
}
/* check that this Unicode code point was still unassigned */
if(old>=0xf00) {
if(old>=0x100) {
if(isFallback>=0) {
fprintf(stderr, "error: duplicate Unicode code point at U+%04x<->0x%02lx see 0x%02x\n",
c, (unsigned long)b, old);
c, (unsigned long)b, old&0xff);
return FALSE;
} else if(VERBOSE) {
fprintf(stderr, "duplicate Unicode code point at U+%04x<->0x%02lx see 0x%02x\n",
c, (unsigned long)b, old);
c, (unsigned long)b, old&0xff);
}
/* continue after the above warning if the precision of the mapping is unspecified */
}

View File

@ -731,6 +731,12 @@ void readHeaderFromFile(UConverterSharedData* mySharedData,
} else if(staticData->conversionType==UCNV_MBCS && mySharedData->table==NULL) {
fprintf(stderr, "error: missing state table information (<icu:state>) for MBCS\n");
*pErrorCode=U_INVALID_TABLE_FORMAT;
} else if(staticData->subChar1!=0 &&
!staticData->conversionType==UCNV_MBCS &&
!staticData->conversionType==UCNV_EBCDIC_STATEFUL
) {
fprintf(stderr, "error: <subchar1> defined for a type other than MBCS or EBCDIC_STATEFUL\n");
*pErrorCode=U_INVALID_TABLE_FORMAT;
}
}