当符合某些条件时,GBase 8s ESQL/C 允许在主变量中使用非 ASCII 字符。
必须确保 C 编译器支持在 C 源代码中使用非 ASCII 字符。有关如何指示 C 编译器提供对非 ASCII 字符的支持的信息,请参阅调用 ESQL/C 过滤器。
GBase 8s ESQL/C 应用程序还支持注释和 SQL 标识中的非 ASCII 字符。有关更多信息,请参阅标识中的非 ASCII 字符。
/* This code fragment declares an integer host variable "hte_ent", which contains a non-ASCII character in the name, and selects a serial value (code number in the "numro" column of the "abonns" table) into it. */ EXEC SQL BEGIN DECLARE SECTION; int hte_ent; ... EXEC SQL END DECLARE SECTION; ... EXEC SQL select numro into :hte_ent from abonns where nom = 'tker';
EXEC SQL BEGIN DECLARE SECTION; char htevar[30]; short ind_de_htevar; EXEC SQL END DECLARE SECTION;
:htevar INDICATOR :htevarind :htevar :htevar ind $htevar $htevar ind