| **Navigation:**  SQL Driver Strings(General) >UNICODE | [[turbosql.htm|{{btn_prev_n.gif|Previous page}}]][[coming future.htm|{{btn_home_n.gif|Return to chapter overview}}]][[useinnerjoin.htm|{{btn_next_n.gif|Next page}}]] | | || **UNICODE ** ** ** **DRIVER('SQLDriver', '/UNICODE= TRUE | FALSE' )** **[ Join" = ] SEND(file, '/UNICODE[ = TRUE | FALSE ]' )** {{blk2blue.jpg|blk2blue.jpg}} By default (UNICODE = False) all STRING fields are considered to contain ANSI characters.  The CREATE statement will attempt to create char fields, or the equivalent for the SQL backend.  All data retrieval and storage functions will inform the database server that the data being passed contains standard ANSI characters. \\ If UNICODE=TRUE, then all STRING fields are considered to contain UTF-16 characters.  The CREATE statement will create an nchar (or equivalent) row with size equal to the field's size divided by 2.  Eg STRING(20) will create an nchar(10).  All data retrieval and storage functions will inform the database server that the data being passed contains UTF-16 characters. using a Driver String:     driverString = driverString & '**/UNICODE**' To enable UNICODE character support for a single field, use the '**| UNICODE**' NAME modifier for the field. Adding the UNICODE switch to the External Name tells the driver to treat the data in the field as Unicode. The CREATE statement will attempt to create the row as a Unicode row.  All data retrieval and storage commands will treat the contents of the field as Unicode data.  See the UNICODE driver string for more details. This switch is only valid for STRING fields and is ignored for fields with other data types. The switch can be set in the Data Dictionary field External Name property, or using PROP:NAME: using PROP:NAME:     UnicodeFile{PROP:Name, 2} = 'strFld [[unicode driver string.htm|| UNICODE]]' Note: Clarion pads all STRING fields with spaces.  It is the responsibility of the programmer to make sure that any STRING field that the driver treats as UNICODE is padded with UNICODE spaces (U+0020).  Due to Windows use of little-endian, a UNICODE space is <;020H><;00H>.  If you do not pad your string with UNICODE spaces, the server will interpret the end of your string as being padded with the UNICODE character U+2020('). The driver string editors have been updated to allow the unicode driver string switch to be set. {{unicodedriverstring.png|UnicodeDriverString}}