NAME
plha - Amiga LhA-compatible command line tool for .lzh/.lha archives
SYNOPSIS
plha [-fc charset] [-tc charset] <command> archive.lzh [files...]
plha l archive.lzh # terse list (LhA l format)
plha v archive.lzh # verbose list (LhA v format)
plha vv archive.lzh # full verbose list (LhA vv format)
plha x archive.lzh # extract all files
plha x archive.lzh foo.txt # extract a specific file
plha t archive.lzh # test archive integrity
plha d archive.lzh # dump raw header data
# Override filename charset
plha -fc cp932 -tc UTF-8 v archive.lzh
plha -fc iso-8859-15 v archive.lzh
DESCRIPTION
plha reads and extracts LZH/LHA archives using Amiga LhA-compatible output formats. It supports header levels 0, 1 and 2, and decompression methods lh0 (stored), lh5, lh6 and lh7.
When invoked as plhasa, a lhasa-compatible interface is activated with different listing formats (l = terse, v = verbose with METHOD and CRC columns) and lhasa-style argument parsing ([-]{lvtxep...} prefix).
COMMANDS
- l
-
List archive contents in LhA terse format: one filename per line, with a
+prefix for files that contain a directory path component. - v
-
List archive contents in LhA verbose format: size, packed size, ratio, date, time and name.
- vv
-
List archive contents in LhA full verbose format: size, packed size, ratio, date, time, attributes, compression method, CRC, header level, OS and name.
- x
-
Extract files from the archive. If file names are given, only those are extracted; otherwise all files are extracted.
- t
-
Test the integrity of all files in the archive by decoding and checking CRC.
- d
-
Dump the raw parsed header data for each entry (for debugging).
OPTIONS
- -fc charset
-
Specify the character encoding of filenames stored in the archive (the "from" charset). Defaults to auto-detection based on the OS field in the archive header:
Amiga (a) -> iso-8859-15 MS-DOS/Win (M/w) -> cp1252 Unix (U) -> UTF-8 Human68K (H/J) -> cp932If the OS field is absent or unrecognised, Encode::Guess is used to guess from latin1, latin2, cp932 and euc-jp.
Supported charset names are those accepted by Encode. Run
perl -MEncode -e 'print join "\n", Encode-encodings(":all")'> for a full list. - -tc charset
-
Specify the output character encoding for displayed filenames (the "to" charset). Defaults to UTF-8.
SEE ALSO
AUTHOR
Nicolas Mendoza <mendoza@pvv.ntnu.no>
LICENSE AND COPYRIGHT
Copyright (c) 2025-2026 Nicolas Mendoza <mendoza@pvv.ntnu.no>.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.