Working with Unicode

If you want to work with Unicode by default, there are a few points you should be aware of:

  • A Unicode enabled Builder and DiveLine are required to build classic models containing UTF-8 data.
  • A Unicode enabled ProDiver is required so the model data displays properly.
  • Workbench and Spectre can build cBases with Unicode data.
  • All 7.x versions of ProDiver, NetDiver, DivePort, and DIAL can properly handle accented and other high-bit characters when built into cBases.

If you have Unicode characters in your column headers and want to use them in Integrator scripts, make sure that Visual Integrator forces everything to Unicode. You can do this as follows:

  1. In Workbench, select Tools > Preferences.

    The Preferences dialog displays.

  2. Select Visual Integrator.

    The Visual Integrator preferences display under four headings: Behavior for Runs, Behavior for Tests, Functionality, and Interface.

  3. Open the Functionality section.

  4. Change File encoding when opening scripts to Force UTF8.

  5. Change the File encoding for new objects to utf-8.

  6. Click OK.

TIP: Any newly created Integrator scripts always have charset 1208 set. However, existing scripts do not get converted automatically. As you develop and maintain scripts, ensure that the charset 1208 is set:

  1. Open the script with Visual Integrator.

    The task flow panel for the script displays.

  2. Click on Main in the Task Tree.

    The Main properties pane displays.

  3. If required, set Charset to 1208.

  4. Click Save.

With charset 1208, you can use unicode characters when editing the objects in the Integrator script, for example, in column names, task names, and calculations. For existing scripts, you may also want to check the encoding attribute for each INPT object to make sure that they are explicitly set to latin1 or utf8.

NOTE: When you add a new INPT object to an Integrator script, the encoding property of that object will be set using the following rule:

If "File encoding for new objects" NE "auto"

Then use the value of "File encoding for new objects"

Else

If the DiveLine is Unicode Enabled

Then encoding = "utf-8"

Else encoding = "latin1"

 

TIP: It is a best practice to be explicit about the encoding for all INPT and OUPT objects. If you know the encoding of the file is UTF-8, set encoding=utf8. If you have some files encoded in Latin1, set encoding=latin1—Integrator will convert it to UTF-8. Defining the encoding of your data files is similar to defining the delimiter—both ensure that your data files are read correctly.