Lugaru's Epsilon
Programmer's
Editor

Context:
Epsilon User's Manual and Reference
   Commands by Topic
      . . .
      Repeating Commands
         Repeating a Single Command
         Keyboard Macros
      Simple Customizing
         . . .
         Saving Customizations
         Command Files
         Using National Characters
      Advanced Topics
         Changing Commands with EEL
         Updating from an Old Version
         Keys and their Representation
         Altering Keys
         Customizing the Mouse
      . . .

Previous   Up    Next
Command Files  Commands by Topic   Changing Commands with EEL


Epsilon User's Manual and Reference > Commands by Topic > Simple Customizing >

Using National Characters

This section explains how to configure Epsilon to conveniently edit text containing non-English characters such as ê or å.

Epsilon supports 8-bit national character sets such as ISO 8859-1 (Latin 1), in those environments (such as Unix and MS-Windows) that provide the appropriate fonts.

Epsilon can also read and write Unicode files encoded in the UTF-16 format. Epsilon autodetects and translates such files to 8-bit format as it reads them and translates back to UTF-16 when writing.

In UTF-8 format, any characters outside the range 0-127 are represented as multi-byte sequences of graphic characters. Epsilon will instead translate to Latin 1 instead of UTF-8 if you set the unicode-use-latin1 variable nonzero. This displays the proper glyph for characters in the range 128-255, unlike the UTF-8 option, but it will perform no conversion at all if a file contains any characters outside the range 0-255.

By default Epsilon automatically translates only those files that start with a UTF-16 marker (a 4-byte sequence that marks the start of most such files). Set the variable unicode-detection to 2 if you want Epsilon to translate files that appear to be in UTF-16 even if they lack this marker. This setting is only recognized if you also set unicode-use-latin1 nonzero. Set unicode-detection to zero to disable automatic UTF-16 detection. The command unicode-convert-encoding may be used for manual translation. The set-unicode-encoding command sets the type of translation Epsilon will perform when you save the current buffer.

The current version of Epsilon cannot utilize Unicode text or other non-8-bit character sets in any other way, only 8-bit character sets.

To use a different 8-bit character set, in windowed environments such as MS-Windows or X, select a font for Epsilon that contains the appropriate national characters. (See Fonts.) In non-windowed environments, configure the system with a suitable font before starting Epsilon.

Once you've used the operating system to configure the keyboard for your language and selected a suitable font, Epsilon should treat national characters like any other characters. You can ignore the rest of this section unless you have trouble typing national characters in Epsilon.

First, check to see if Epsilon is using a multi-character representation for characters. View a file containing some national characters. If some national characters appear with multi-character representations like M-^H or xCE, use the set-show-graphic command. (See Customizing the Screen.)

You may find that when you type a certain national character, Epsilon beeps, or runs an unexpected command, or something similar. The character might happen to use the same code as an Epsilon command. In Epsilon for Unix, running without X support, see the national-keys-not-alt variable. Alternatively, you can fix this problem by rebinding that key. (See Binding Commands.)

To rebind the key for a national character, press F4 to run the bind-to-key command. It will ask for the name of a command to bind. Type normal-character and press <Enter>. It will then ask you to press the key you want to rebind. Press the troublesome key. This should fix the problem. Because this procedure replaces key bindings, you may find that typing a command's key sequence unexpectedly inserts a national character. You can bind that command to a different key, or run it by name.

The rest of this section only applies to Epsilon for DOS and OS/2.

Before rebinding a key as explained above, DOS users should run the program-keys command, and select the I option to modify the translation of an individual key. Press the troublesome key. Epsilon will display a message such as "Key Alt-+, #299 is translated to Alt-+, #299 - change?" Press Y to change the key's translation, and enter -1 as the key's new translation. If this doesn't correct the problem, use the procedure above to rebind the key.

With some national keyboards, to type certain characters you must hold down the Alt key, and enter the key code numerically on the keypad. By default, this doesn't work in Epsilon for DOS or OS/2. To make it work, run the program-keys command. Then select the A option. (See Altering Keys.) Instead of making this change, you can use Epsilon's insert-ascii command on Alt-# to enter a code by number. See Inserting and Deleting. If you often enter the same character in this way, a keyboard macro can make this more convenient. See Keyboard Macros.



Previous   Up    Next
Command Files  Commands by Topic   Changing Commands with EEL


Lugaru Copyright (C) 1984, 2020 by Lugaru Software Ltd. All rights reserved.