mplpl / unrar_amiga

Port of unrar for MorphOS, AmigaOS and AROS
Other
6 stars 2 forks source link

It is not clear how to enable NLS support in unrar for AmigaOS3 #24

Closed mplpl closed 4 years ago

mplpl commented 4 years ago

When running unrar in AmigaOS3 it is neccesary to set RAR_CODEPAGE variable but it is only state in the body readme and some users may have problems with finding it. We need to find a better way.

mplpl commented 4 years ago

In order to improve the situation, I'm doing the followings: 1) when initialization of conversion library (iconv) fails, unrar will display a message about incorrect (unsupported) encoding selected 2) when during names conversion unsupported characters are detected, unrar will display a message about the need of setting encoding using RAR_CODEPAGE environment variable

mplpl commented 4 years ago

Here is how it looks in practice:

System:Data/c/unrar_amiga_5.9.2> unrar l /unrar_test/tests/unrar_test_11.rar

UNRAR 5.90 freeware      Copyright (c) 1993-2020 Alexander Roshal

MorphOS port by Marcin Labenski

Archive: /unrar_test/tests/unrar_test_11.rar
Details: RAR 5

 Attributes      Size     Date    Time   Name
----------- ---------  ---------- -----  ----
 -rw-rw-rw-     72846  2019-03-11 11:09  a????????�????????�.jpeg
----------- ---------  ---------- -----  ----
                72846                    1

WARNING: Some characters used in file names in this archive have not been converted because they are not available in ISO-8859-1 encoding. Set RAR_CODEPAGE environment variable to select the right encoding.

System:Data/c/unrar_amiga_5.9.2>
System:Data/c/unrar_amiga_5.9.2> setenv RAR_CODEPAGE=xxxxxxxxx
System:Data/c/unrar_amiga_5.9.2> unrar l /unrar_test/tests/unrar_test_11.rar

UNRAR 5.90 freeware      Copyright (c) 1993-2020 Alexander Roshal

MorphOS port by Marcin Labenski

Archive: /unrar_test/tests/unrar_test_11.rar
Details: RAR 5

 Attributes      Size     Date    Time   Name
----------- ---------  ---------- -----  ----
 -rw-rw-rw-     72846  2019-03-11 11:09  a????????�????????�.jpeg
----------- ---------  ---------- -----  ----
                72846                    1

WARNING: xxxxxxxxx encoding is not supported. Select a different one by setting RAR_CODEPAGE environment variable.
mplpl commented 4 years ago

Also it is worth noting, that above works on all operating system now just AmigaOS3 (as title of this ticket suggests).