Non-ASCII characters might appear in these contexts in a C-UDR source file:
The C compiler must recognize the code set that you use in your C-language statements. The capabilities of your C compiler might limit your ability to use non-ASCII characters within the C-language statements in a UDR source file. For example, some C-language compilers support multibyte characters in literals or comments only.
If the C compiler does not fully support non-ASCII characters, it might not successfully compile a UDR that contains these characters. In particular, the following situations might affect compilation of your UDR:
A component of a multibyte character might be indistinguishable from certain single-byte characters such as percent ( % ), comma, backslash ( \ ), and double quote ( " ). If such characters exist in a quoted string, the C compiler might interpret them as C-language tokens, which can result in compilation errors or even lost characters.
If a code set contains non-ASCII characters (with code values that are greater than 127), the C compiler must be 8-bit clean to interpret the characters. To be 8-bit clean, a compiler must read the eighth bit as part of the code value; it must not ignore or put its own interpretation on the meaning of this eighth bit.
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:
For more information, see Naming Database Objects.
For example, in a UDR, the following use of multibyte characters is valid:
mi_exec(conn, "insert into tbl1 (nchr1) values 'A1A2B1B2'", 0);