可选的函数,返回属于链中的下一个解析器类的数据的编码字符集标识(CCSID)(如果有)。
在其中定义 | 类型 | 成员 |
CPI_VFT | 可选 | iFpNextParserCodedCharSetId |
int cpiNextParserCodedCharSetId( CciParser* parser, CciContext* context);
返回数据的 CCSID。如果未知,则可能返回零并且将应用缺省 CCSID。
此示例取自样本解析器文件 BipSampPluginParser.c(820 行到 839 行):
int cpiNextParserCodedCharSetId( CciParser* parser, CciContext* context ){ PARSER_CONTEXT_ST* pc = (PARSER_CONTEXT_ST *)context ; int ccsid = 0; if (pc->trace) { fprintf(pc->tracefile, "PLUGIN: -> cpiNextParserCodedCharSetId() parser=0x%x context=0x%x\n", parser, context); fflush(pc->tracefile); } if (pc->trace) { fprintf(pc->tracefile, "PLUGIN: <- cpiNextParserCodedCharSetId()\n"); fflush(pc->tracefile); } return ccsid; }