Character set conversion of your data and/or application

Each file that contains text in some form, is encoded in a specific character set, although the average computer user is normally not aware of this. The character set determines which characters can be used in the text, and implicitly determines the compatibility of the file with all kinds of software.
In Adlib it's important to distinguish the encoding of your data (the .cbf file and its indexes) and all other Adlib files, like the application structure (.pbk) or database definitions (.inf).

Change the encoding of Adlib structure and settings files

The Encoding property of Adlib structure and settings files, displays the type of character set used to encode texts that you provide for properties of the object/file. Different files may have a different encoding, but to prevent confusion about what characters can be used where, it is of course best if all Adlib structure and settings files use the same character set. You can change the setting for an individual file manually, if desired.

You can change the encoding of database structures (.inf files), application structures (.pbk files) and screens (.fmt files) also simultaneously, with the Application character set conversion tool in Axiell Designer. (The currently used character set of a .pbk, .inf or .fmt file is displayed on the Properties tab under Encoding when you select such a file in the Application browser.)
Start the Application character set conversion tool by choosing Tools > Application character set conversion in the main Axiell Designer window. With this tool you can convert your Adlib application (only .pbk, .inf, and .fmt files) to any of three character sets. But probably you will only use it to convert a DOS (OEM) application to either an ISO-Latin (ANSI) or Unicode one, or to convert an ISO-Latin application to Unicode. Note again that this tool only converts the application and database structures, not your databases and data.

You only need to consider using this tool if your language has accented or other special characters and you need to use those in for instance the labels of fields, or in title bars. Once converted to another (expanded) character set, you'll be able to use characters from it in your application setup.

Before converting, make sure you select the proper work folder. Since you probably want the change to affect all your Adlib modules, you must select your main (copy of an) Adlib folder, and mark the Convert subfolders option in this tool window.

Note that a Unicode application may cause problems if you want to edit it in one of the old DOS tools ADSETUP or DBSETUP, because Unicode characters cannot be displayed in there.

Also note that the ANSI version of adlwin.exe, can run Unicode applications that work on ANSI or DOS databases.

Change the encoding of your data

Your data is stored in databases (.cbf files) and the derivative indexes. If you need to be able to enter different characters than the current encoding allows, you may consider a conversion of your databases. The current encoding of your data can be found in the Locale property of each database.

The following guidelines can be given for changing this property for existing databases:

The encoding of the data can be different from the encoding of Adlib structure and settings files.
The value of the Locale option must be the same for all databases in a single Adlib application, otherwise an error will occur.
Simply change DOS to ISO-Latin if you want to be able to enter characters like the euro-sign €, but are not interested in characters from languages like Hebrew, Chinese, etc. All characters in ISO-Latin (more specifically WinLatin1-cp1252) that are extra to DOS, are the following:

 

WINLatin1cp1252

 

You need no special conversion of your data because the DOS character set is a subset (the first half) of the entire ISO-Latin set (the image above only displays the second half).

You need Unicode (UTF-8 representation) encoding, if you want to be able to enter characters that do not occur in either DOS or ISO-Latin, and/or use the sort and search order of your language region (see the description of Locale). This is not just a matter of changing this setting, unfortunately. It involves an elaborate conversion. Ask Adlib for more information.
Note that if your databases are encoded in (UTF-8) Unicode, you'll need adlwin.exe version 6.0 or higher to run your Adlib application.

Conversion of data during import - If you are about to import an existing DOS database into your ANSI (ISO-Latin) or UTF-8 Unicode encoded data, you must convert the imported records to the proper encoding explicitly (from Adlib version 6.2.0). In the field mapping of an import job you must then use a special tag pair to execute this character set conversion of your data during import (either from adlwin applications or designer). As source tag, enter: DOS, and as destination tag, enter: <CHARSET>. (Type both terms literally as printed here.)
If you are about to import an existing ANSI encoded database into a UTF-8 encoded database, then enter as the source tag: ANSI, and as the destination tag, again: <CHARSET>. (This particular tag pair is available from Adlib version 6.2.0.) Also, remove the wordlist.idx file before importing: it will be rebuilt automatically during import, in the new encoding.
The third possible conversion is from UNICODE to UTF-8, which requires UNICODE as source tag and <CHARSET> as destination tag.
The fourth possible conversion is from OCLC to the encoding of the target database (ANSI or UTF-8 Unicode). The relevant tag pair is: OCLC <CHARSET>.

Conversion of data after export - Data will always be exported from Adlib to UTF-8 encoded Unicode files, regardless of the encoding of your databases. If you want these exchange files to be encoded differently, you'll have to do that separately in Windows NotePad or WordPad. Just open the exchange file in the appropriate text editor and save it in the desired encoding.

See also

Inserting special characters in text