In SQL statements
In C UDRs, SQL statements occur as literal strings to the mi_exec( ) and mi_prepare( ) functions.
The C compiler does not parse these literal strings. Therefore, it does not need to recognize the code set of the characters in these SQL statements.
Within a C source file, you can use non-ASCII characters in SQL
statements for the following objects:
- Names of SQL identifiers such as databases, tables, columns, views,
constraints, prepared statements, and cursors
For more information, see Name database objects.
- Literal stringsFor example, in a UDR, the following use of multibyte characters is valid:
mi_exec(conn, "insert into tbl1 (nchr1) values 'A1A2B1B2'", 0);
- File names and path names, as long as your operating system supports multibyte characters in file names and path names
Important: To use non-ASCII characters in your SQL
statements, your server-processing locale must include either a code
set that supports these characters or a code set that is compatible
with the character code set. For information about how to perform code-set
conversion, see Character strings in UDRs.