From: Markus Scherer Date: Wed, 7 Dec 2011 00:34:11 +0000 (+0000) Subject: ICU-8827 more genuca white space parsing fixes X-Git-Tag: milestone-59-0-1~4289 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=46555dac608f620ec3721e6fe5b9258c549e4644;p=icu ICU-8827 more genuca white space parsing fixes X-SVN-Rev: 31046 --- diff --git a/tools/unicode/c/genuca/genuca.cpp b/tools/unicode/c/genuca/genuca.cpp index 269942464fc..fe98ff3916d 100644 --- a/tools/unicode/c/genuca/genuca.cpp +++ b/tools/unicode/c/genuca/genuca.cpp @@ -613,9 +613,9 @@ UCAElements *readAnElement(FILE *data, tempUCATable *t, UCAConstants *consts, Le {"[fixed last special byte", &consts->UCA_PRIMARY_SPECIAL_MAX, READHEX1}, {"[variable top = ", &t->options->variableTopValue, READHEX2}, {"[UCA version = ", NULL, READUCAVERSION}, - {"[top_byte\t", NULL, READLEADBYTETOSCRIPTS}, - {"[reorderingTokens\t", NULL, READSCRIPTTOLEADBYTES}, - {"[categories\t", NULL, IGNORE}, + {"[top_byte", NULL, READLEADBYTETOSCRIPTS}, + {"[reorderingTokens", NULL, READSCRIPTTOLEADBYTES}, + {"[categories", NULL, IGNORE}, {"[first tertiary in secondary non-ignorable", NULL, IGNORE}, {"[last tertiary in secondary non-ignorable", NULL, IGNORE}, {"[first secondary in primary non-ignorable", NULL, IGNORE}, @@ -704,7 +704,8 @@ UCAElements *readAnElement(FILE *data, tempUCATable *t, UCAConstants *consts, Le } } else if (what_to_do == READLEADBYTETOSCRIPTS) { //vt[cnt].what_to_do == READLEADBYTETOSCRIPTS pointer = buffer + vtLen; - + skipWhiteSpace(&pointer, status); + uint16_t leadByte = (hex2num(*pointer++) * 16) + hex2num(*pointer++); //fprintf(stdout, "~~~~ processing lead byte = %02x\n", leadByte); if (leadByte >= leadByteConstants->LEAD_BYTE_TO_SCRIPTS_INDEX_LENGTH) { @@ -764,6 +765,7 @@ UCAElements *readAnElement(FILE *data, tempUCATable *t, UCAConstants *consts, Le char scriptName[100]; pointer = buffer + vtLen; + skipWhiteSpace(&pointer, status); uint32_t scriptNameLength = readElement(&pointer, scriptName, '\t', status); int32_t reorderCode = getReorderCode(scriptName); if (reorderCode >= 0) {