You can use FileFlex to translate character sets within a text container using the DBTranslateChars function. DBTranslateChars takes two parameters: the string to be translated and the pre-built translation table. It returns the translated string.
To use FileFlex character-level translation, you develop a translation table that describes the new and old values and pass it to FileFlex along with a container of characters to be translated.
Setting up a character translation table is very straightforward. You need to build a string consisting of 256 characters. The position in the string is the value of the old character and the value at that position becomes the new character.
Note: The first character in the string is considered "position 0" by FileFlex. Also note that you cannot place a 0 into any character position. If you do not want translation, place the corresponding character value into that position or the value 255.
|