EuroText is a program from the collection EuroTool used as a viewer of text files in arbitrary encodings (UTF, OEM, ANSI).
Input file name can be specified as an argument on command line, e. g. eurotext "Input.txt" or
eurotext /InputFile="Input.txt".
In Windows version it can also be selected with a common dialog, by pressing the key O.
Encoding of the input file will be autodetected (default) or it may be selected explicitly
as an argument on command line, e. g. eurotext "Input.txt" /InputEncoding=IBM852 or shortly
eurotext "Input.txt" -ie=IBM852
Long lines may overflow behind the right border of the window unless we
select the option wrap by the key W.
Current position of character in the file {row}[column] pointed to by the mouse is indicated in the status line
above the document, right behind the file name. This happens at the right mouse button click.
Some options are available in Window version only: copying to clipboard, searching for a text string, changing the font size, choosing encoding from menu.
EuroText never changes the file which is viewed. It may be edited while EuroText is still viewing
the original version of the same file.
Pressing the key Esc terminates the program.
Example of EuroText launched with eurotext.exe alphabet.txt:
How does the program work:
- EuroText reads the global configuration (
%AppData%\eurotool\eurotext.iniin Windows or/etc/eurotool/eurotext.iniin Linux) if it exists. It does not try to create the configuration file when it did not exist.- Then it reads arguments from the command line. If an input file is specified, EuroText tries to open it, otherwise it displays the help screen.
- EuroText will convert encoding of the input text to a temporary output file. In Windows version it will be encoded to UTF-16LE and temporarily stored as
%TEMP%\input.txt.lst.
Its temporary index will be stored as%TEMP%\input.txt.lst.index.- In Linux version of EuroText the temporary output file will be converted to UTF-8 and stored as
/tmp/input.txt.lst.
Its temporary index will be stored as/tmp/input.txt.lst.index.- The text is now viewable. The key W will switch the wrapping on|off.
Pressing Esc terminates the program EuroText.
Both programs in this source file have the name eurotext
. The linked executable file for Linux has the name
eurotext.x
and the version for Windows has the name eurotext.exe
.
Both executables will be built with the command euroasm eurotext.htm.
Linux GUI version works with ANSI terminal in character pseudo graphic mode.
Common configuration and argument processing for both Linux and Windows version:
EUROASM CPU=X64, Unicode=No, NoWarn=0563
INCLUDE argument.htm ; Assemble the common module argument.htm.
INCLUDE textling.htm ; Assemble the module textling.htm (Linux pseudographic subsystem).
eurotext PROGRAM Format=ELFX, Width=64, Entry=Main
LINK textling.obj, argument.obj ; Link two modules to the final eurotext.x
.
ENDPROGRAM eurotext
INCLUDE textwing.htm ; Assemble the module textwing.htm (Windows graphic subsystem).
eurotext PROGRAM Format=PE, Width=64, Entry=Main, Subsystem=con, IconFile=eurotext.ico
LINK textwing.obj, argument.obj ; Link two modules to the final eurotext.exe
.
ENDPROGRAM eurotext