Solaris Common Desktop Environment: User's Guide

Thai Text Manipulation

This section explains the mechanics of manipulating Thai characters.

Typing Thai Text

You may need to intersperse Thai and English text in the same file. To toggle a window between English and Thai or Thai and English, press Ctrl+spacebar. The message window at the base of each tool displays the current input language.

Editing Thai Text

This section describes how to work with Thai text, specifically, how to:

Character Insertion and Deletion

Inserting and deleting Thai characters changes the display of the text, depending on whether the character classes can be composed.

The following graphics show the sequence of inserting MAIHUNAKAT (AV2 vowel) between SARA_II (AV3 vowel) and YOYAK (consonant) .

Figure D-1 Logical Buffer and Display Before Text Insertion


Figure D-2 Logical Buffer and Display After Text Insertion


MAIHUNAKAT cannot be composed with SARA_II, so it must be displayed in its own cell.

The following example shows the deletion of SARA_II (AV3 vowel).

Figure D-3 Logical Buffer and Display Before Text Deletion


Figure D-4 Logical Buffer and Display After Text Deletion


MAIHUNAKAT can be composed with NONU (consonant class CONS). Therefore, it is displayed in the previous cell.

Character Wrapping

There are no delimiters (spaces) between words in Thai. This makes correct character wrapping difficult because of the combinations of spacing and non-spacing characters.

In Solaris 7 TLE character wrapping is done at the display cell, and the TLE software compensates for non-spacing characters when wrapping a line. For example, when a forward spacing character is typed in the last column of a line, the cursor advances to the next line. If a non-spacing character is typed at the same point, the cursor does not advance to the next line. The non-spacing character is displayed in the last display cell of the previous line, and the cursor location remains unchanged.

Text Selection, Copy/Paste, and Drag-and-Drop

When a display cell is selected, all characters within the display cell (spacing and non-spacing) are selected.

Cursor Movement in an Editor Window (dtpad)

The multiple display levels of the Thai language may seem to cause unusual cursor movement in dtpad (text editor) windows. The cursor physically moves only between display cells. However, because there is frequently more than one Thai character in a display cell, the cursor does not physically move between them.

Cursor Movement in a Terminal Window (dtterm)

Cursor movement in a Terminal window is slightly different from editing text in one of the Thai CDE tools using text widgets (such as dtpad). When you move the cursor in a Terminal window, if there is only one character in a display cell, the cursor will be highlighted in the cell. If the character shares a display cell, the entire display cell will be highlighted.

You can display a combination of Thai and English characters using the four Thai fonts included in this release. The fonts are listed in Table D-1 and Table D-2.