Logo Search packages:      
Sourcecode: t1utils version File versions  Download package

int Clp_SetUTF8 ( Clp_Parser clp,
int  utf8 
)

Set clp's UTF-8 mode.

Parameters:
clp the parser
utf8 does the parser support UTF-8?
Returns:
previous UTF-8 mode
In UTF-8 mode, all input strings (arguments and long names for options) are assumed to be encoded via UTF-8, and all character names (Clp_SetOptionChar() and short names for options) may cover the whole Unicode range. Out of UTF-8 mode, all input strings are treated as binary, and all character names must be unsigned char values.

Furthermore, error messages in UTF-8 mode may contain Unicode quote characters.

Definition at line 600 of file clp.c.

References Clp_Parser::internal.

{
    Clp_Internal *cli = clp->internal;
    int i, j, old_utf8 = cli->utf8;
    cli->utf8 = utf8;
    for (i = 0; i < cli->nopt; ++i) {
      cli->iopt[i].lmmpos = cli->iopt[i].lmmneg = 1;
      cli->iopt[i].lmmpos_short = cli->iopt[i].lmmneg_short = 0;
      for (j = 0; j < cli->nopt; ++j)
          compare_options(clp, &cli->opt[i], &cli->iopt[i],
                      &cli->opt[j], &cli->iopt[j]);
    }
    return old_utf8;
}


Generated by  Doxygen 1.6.0   Back to index