ICU-2569 fix makeconv bugs for .ucm error checking
X-SVN-Rev: 11520
This commit is contained in:
parent
1bba328280
commit
a6a7a302bf
@ -929,14 +929,14 @@ MBCSSingleAddFromUnicode(NewConverter *cnvData,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* check that this Unicode code point was still unassigned */
|
/* check that this Unicode code point was still unassigned */
|
||||||
if(old>=0xf00) {
|
if(old>=0x100) {
|
||||||
if(isFallback>=0) {
|
if(isFallback>=0) {
|
||||||
fprintf(stderr, "error: duplicate Unicode code point at U+%04x<->0x%02lx see 0x%02x\n",
|
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;
|
return FALSE;
|
||||||
} else if(VERBOSE) {
|
} else if(VERBOSE) {
|
||||||
fprintf(stderr, "duplicate Unicode code point at U+%04x<->0x%02lx see 0x%02x\n",
|
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 */
|
/* continue after the above warning if the precision of the mapping is unspecified */
|
||||||
}
|
}
|
||||||
|
@ -731,6 +731,12 @@ void readHeaderFromFile(UConverterSharedData* mySharedData,
|
|||||||
} else if(staticData->conversionType==UCNV_MBCS && mySharedData->table==NULL) {
|
} else if(staticData->conversionType==UCNV_MBCS && mySharedData->table==NULL) {
|
||||||
fprintf(stderr, "error: missing state table information (<icu:state>) for MBCS\n");
|
fprintf(stderr, "error: missing state table information (<icu:state>) for MBCS\n");
|
||||||
*pErrorCode=U_INVALID_TABLE_FORMAT;
|
*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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user