Handle non-ASCII characters

The processors obtain the code set for use in source files from the client locale.

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

    For more information, see Name database objects.

  • host variable and indicator variable names
    For example, in the 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 host variables, see Non-ASCII characters in host variables.

  • Literal strings
    For example, in the 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 processor calls a multibyte filter. For more information, see Generate non-ASCII file names.

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