AConv

Text conversion between Amiga, Atari, ZX Spectrum, MS-DOS and Windows encodings

AConv.exe
Version
2.1.0.18
System
Windows, 64-bit
Source
github.com/pedromagician/AConv
Download AConv263 kBAConv.exe with the encoding dictionaries in the dict folder.Download Sublime Text plugin315 kBSublime Text 4 package including AConv.exe: copy the AConv folder from the zip into Packages (Preferences → Browse Packages…).

No installation: unzip anywhere (ideally into a folder on your PATH) and run it from the command line or a batch file.

AConv is a command-line tool that converts text between retro and modern character encodings: Amiga, Atari 8-bit, MS-DOS, Windows and ZX Spectrum. Characters are mapped by dictionaries (.dict), which are plain text files, so you can add your own encodings. If you don’t know the encoding of a text, AConv can detect it. The original concept is by Wolf; I maintain and extend the program.

Features

The zip contains dictionaries for the Amiga (CZ, E2, Kamenický, KOI8, Latin 1, Latin 2, PBX, PL2), Atari (CZ, EN), ZX Spectrum and helper conversions (remove diacritics, lower and upper case).

Sublime Text plugin

The second zip is a package for Sublime Text 4 that uses AConv right in the editor: Tools → AConv converts the open file (or just the selection) between Windows and the Amiga, Atari or ZX Spectrum, and adds quick conversions (DEC/HEX/BIN, upper and lower case, removing diacritics). It can also detect the encoding of a file. Conversion profiles are in AConv.cfg.

Usage

rem detect the encoding of a file
AConv.exe -detect -input text.txt -dict dict\*.dict

rem Windows text for the Amiga and back (output in ANSI)
AConv.exe -i story.txt -o story.ami -k dict\amiga_e2.dict -t w2b
AConv.exe -i story.ami -o story.txt -k dict\amiga_e2.dict -t b2w -f ansi

rem file bytes as decimal numbers
AConv.exe -i file.bin -o dump.txt -decdump

Detection lists the encodings from the most likely one:

PC-Latin 2 => score 1090, confidence 0.74
Amiga E2 => score 1082, confidence 0.73
ZX(Win) for BasinC => score 424, confidence 0.29

Options

SwitchDescription
-input, -iSource file.
-output, -oDestination file. Without it, the output is inputFileName.out.
-inputClipboard, -icRead the input from the clipboard instead of a file.
-outputClipboard, -ocWrite the output to the clipboard instead of a file.
-keymap, -kCharacter map (dictionary) for the conversion. Default: keyMap.dict.
-type, -tConversion type: b2b, b2w, w2b, w2w.
-invert, -invInverts the character map (mainly for w2w and b2b).
-format, -fOutput format when converting to Windows: ansi, utf8, bom (UTF-8 with BOM).
-detect, -dDetect the encoding of the input file.
-dictDictionaries for detection, a mask is allowed (dict\*.dict).
-decdump, -ddWrite each input byte as a decimal number.
-hexdump, -hdWrite each input byte as a hexadecimal number.
-generatekeymap, -gGenerate a default character map into keyMap.dict.
-errorlevel, -eUnknown characters: 2 replace and warn (default), 1 warn only, 0 nothing.
-errorcharacter, -cReplacement for unknown characters, default ?.
-log, -lConsole logging: all, important, errors, silent.
-help, -h, -?Help.