mined 98

release 5/99

mined as a Unicode editor / UTF-8 editor

The editor mined supports the UTF-8 representation of Unicode.

Environment:

  • Mined is a text mode editor. Its UTF-8 support is available for example with the newer versions of Thomas Dickey's xterm. Configure it with the option "--enable-wide-chars" or use this xterm configuration script. After "make", invoke it with xterm -u8 or set the appropriate X resource.
  • There are a couple of Unicode fonts available for X.
  • How to use UTF-8 modes with mined:

    Screen handling
    If you have arranged (as suggested above) that the environment variable utf8_term will indicate when you are within a UTF-8 mode terminal, mined will adapt its display mode accordingly.
    Character encoding
    By default, mined detects automatically if any edited file is UTF-8 encoded text (Unicode character set) or 8-bit encoded (Latin-1 character set).
    It also detects UTF-16 (16-bit Unicode representation with surrogate pairs for a 21-bit character set) and transforms it automatically into UTF-8.
    UTF-8 is the internal representation of mined's Unicode editing. It also handles illegal UTF-8 sequences so if you accidentally open a Latin-1 file in UTF-8 mode, you may still edit the contents and will not loose any character information.

    So mined can be invoked with  mined [«filenames ...»] and all UTF-8 functionality will be available as appropriate.
    If you prefer manual configuration, the following options are available:

    mined -U -u [«filenames ...»] edits UTF-8 files in a UTF-8 terminal
    mined -U [«filenames ...»] edits Latin-1 (8-bit) files in a UTF-8 terminal
    The option -U selects UTF-8 input and output unless UTF-8 input is already selected in which case it deselects both.
    UTF-8 terminal mode can instead be selected by setting the environment variable utf8_term. UTF-8 output and input can be selected separately with the environment variables utf8_screen or utf8_input, respectively.
    mined -u [«filenames ...»] edits UTF-8 files in a Latin-1 (8-bit) terminal
    In this mode, Unicode characters with non-Latin-1 code (greater than 0xFF) are displayed as a block symbol ¤. Set the environment variable MINEDUNI="46" to enable coloured background of that symbol. Also, UTF-8 control character sequences and illegal UTF-8 sequences are displayed using this highlighting.

    Screenshot:

    UTF-8 related commands:

    ESC u displays the UTF-8 byte sequence and Unicode value in hexadecimal on the status line
    HOP ESC u toggles permanent code display
    ESC U replaces a character with its hexadecimal Unicode value
    ESC X replaces a character with its hexadecimal UTF-8 byte sequence
    input support:
    ^V#XXXX inserts the character with given hexadecimal Unicode value
    ^Vae (with two characters ae, ~n, etc) inserts a character composed from the two characters entered. Mnemonics from RFC 1345 and some others are accepted.
    ^V euro (with a mnemonic, e.g. euro, between two blanks) inserts a character that has the entered mnemonic name. Mnemonics from RFC 1345 and some others are accepted.

    Download

    mined98.tar.gz or mined98.zip

    Thomas Wolff
    towo@computer.org