Handle non-ASCII characters

The HCL OneDB™ ESQL/C processors obtain the code set for use in HCL OneDB ESQL/C source files from the client locale.

Within the HCL OneDB ESQL/C source file, you can use non-ASCII characters for the following program objects:
  • HCL OneDB ESQL/C comments
  • Names of SQL identifiers such as databases, tables, columns, views, constraints, prepared statements, and cursors

    For more information, see Name database objects.

  • HCL OneDB ESQL/C host variable and indicator variable names
    For example, in the HCL OneDB ESQL/C program, this use of multibyte characters is valid:
    char A1A2[20], B1B2[20];
    EXEC SQL select col1, col2 into :A1A2 :B1B2;

    For more information about HCL OneDB ESQL/C host variables, see Non-ASCII characters in host variables.

  • Literal strings
    For example, in the HCL OneDB ESQL/C program, the following use of multibyte characters is valid:
    EXEC SQL insert into tbl1 (nchr1) values 'A1A2B1B2';
  • File names and path names, if your operating system supports multibyte characters in file names and path names.
Tip: Some C-language compilers support multibyte characters in literals or comments only. For such compilers, you might need to set the ESQLMF and CC8BITLEVEL environment variables so that the HCL OneDB ESQL/C processor calls a multibyte filter. For more information, see Generate non-ASCII file names.

To use non-ASCII characters in your HCL OneDB ESQL/C source file, the client locale must support them. For information about the use of non-ASCII characters, see Non-ASCII characters in identifiers.