solidDB Help : Samples : Unicode sample
  
Unicode sample
This sample contains C and Java applications to demonstrate how to use externally UTF-8 encoded data with a solidDB Unicode database. A solidDB Unicode database is a database where the CHAR data is encoded internally in UTF-8 and WCHAR data is stored as UTF-16. For more information, see Working with Unicode.
The files for the sample are located in the soliddb-installdir\samples\unicode directory.
Note To run the sample, you must install JDK 1.7 or later and set the PATH and CLASSPATH settings for the Java compiler.
For general information about running the samples, see Samples.
The sample consists of the following files that are all encoded in UTF-8 and use explicit UTF-8 characters and code-point-encoded literals:
UCCodePageTest.sql: a script that creates a table with an integer key column, a CHAR column, and a WCHAR column.
UCCodePageTest.java: a Java application that inserts data into the table.
UCCodePageTest.c: an ODBC application that inserts data into the table.
Note solid.ini (in the run directory) includes the relevant UTF-8 parameter settings (Client.ODBCCharBinding=utf8, General.InternalCharEncoding=utf8)
Running the sample
Run the runme script (runme.bat in Windows), which compiles the applications, starts a server, sets the code page to 65001, runs the script and the applications, and sets the code page to 1252.
All program output is appended to the file utf8.out in UTF-8 form.
Go up to
Samples