Using the Extended Character Set

By default, Vermont Views does not support the IBM Extended Character Set, that is, characters with keycodes 128 to 255. The default settings do not allow the user to enter any extended characters, which include international alphabetic characters, block graphics characters, and mathematical symbols, in data-entry fields. Also not supported is the proper upper- and lowercase conversion of characters in this range.

To enable support for the extended character set, you must #include the extended character header file in your main program. For example:

#include <vv_extch.h>

#include <vv_main.h>

The vv_extch.h header files contains an uppercase/lowercase conversion table for the extended characters and enables use of these characters in data forms.

Controlling Upper- and Lowercase Conversions of Characters

The following functions deal with upper- and lowercase conversions of one or more characters: st_toupper(), st_tolower(), ch_toupper(), and ch_tolower(). The functions ch_isupper() and ch_islower() test if a given character is upper- or lowercase.

All six of these functions use the functions supplied by the compiler in converting or determining character case for characters in the ASCII range 0 to 127.

Case conversion for characters in the extended character set (128 to 255) is determined by the case conversion table defined in the header file vv_main.h. This case conversion table is used only if the header file vv_extch.h is included in your program.

The case conversion table in vv_main.h lists a character conversion structure for each ASCII character code from 128 to 255. The first member of the structure lists the ASCII code for the opposite case of the character and the second member of the structure lists the characters type.

For example, the line for character 128 reads as follows:

{135, CH_ALPHA | CH_UPPER},    /*128            */

This means that character 128 ("Ç") is an alphabetic character and also an uppercase character. Its opposite case (lowercase), is character 135 ("ç").

The line in the case conversion table for character 131 reads:

{'A', CH_ALPHA | CH_LOWER},    /*131            */

This means that character 131 ("â") is an alphabetic, lowercase character. Its uppercase character is an 'A'.

Characters that are graphic characters are described with type CH_GRAPHIC. The opposite case for a graphic character is itself, for example:

{176, CH_GRAPHIC},            /*176            */

Characters that are symbols are often considered both upper- and lowercase characters. The opposite case character for a symbol is often itself.

The default case conversions are listed in the Function Reference. These conversions are made to the best of our knowledge of the international character set. Feel free to change the table.


Home Contents Previous Next