lha icon indicating copy to clipboard operation
lha copied to clipboard

iconv is a problem

Open Lucretia opened this issue 2 years ago • 4 comments

I've had issues unpacking some Amiga archives because of iconv, I've posted a bug here you should look at.

Lucretia avatar Jul 20 '23 23:07 Lucretia

It seems that filename encoding in the archive is ISO-8859-1. The current version of lha does not support it.

$ wget http://aminet.net/driver/audio/m68k-amigaos-ahidev.lha
$ lha l m68k-amigaos-ahidev.lha
...
-rw-r--r--   901/901      2579  48.7% Nov 21  2005 m68k-amigaos-ahi/Developer/Translations/ahi/català.ct
...
-rw-r--r--   901/901      2641  47.9% Nov 21  2005 m68k-amigaos-ahi/Developer/Translations/ahi/español.ct
-rw-r--r--   901/901      2602  48.6% Nov 21  2005 m68k-amigaos-ahi/Developer/Translations/ahi/français.ct
...
-rw-r--r--   901/901      2652  48.6% Nov 21  2005 m68k-amigaos-ahi/Developer/Translations/ahi/português.ct
...
-rw-r--r--   901/901      4733  44.8% Nov 21  2005 m68k-amigaos-ahi/Developer/Translations/ahiprefs/català.ct
...
-rw-r--r--   901/901      4860  44.4% Nov 21  2005 m68k-amigaos-ahi/Developer/Translations/ahiprefs/español.ct
-rw-r--r--   901/901      4699  43.9% Nov 21  2005 m68k-amigaos-ahi/Developer/Translations/ahiprefs/français.ct
...
-rw-r--r--   901/901      4902  44.9% Nov 21  2005 m68k-amigaos-ahi/Developer/Translations/ahiprefs/português.ct

hirotosakai avatar Jul 23 '23 12:07 hirotosakai

This is a patch for this issue. Now, we can unpack such archives with --archive-kanji-code=latin1 option. However, I don't think it is a good solution.

42.diff.txt

hirotosakai avatar Sep 15 '23 15:09 hirotosakai

This is another solution. We can disable filename conversion with the --disable-convert-filename-encoding option to avoid the iconv error.

disable-convert-filename-encoding.diff.txt

hirotosakai avatar Sep 27 '23 14:09 hirotosakai

FWIW, --archive-kanji-code=latin1 may not be a "good solution" but it allows me to create lha archives with filenames containing latin1 chars such as "Catalogs/français/appname.catalog". Thanks!

kjeacle avatar Jan 06 '24 09:01 kjeacle