TriForceX / MiyooCFW

Custom firmware source code and resources for BittBoy, PocketGo, PowKiddy V90-Q90-Q20 and third party handheld consoles
GNU General Public License v2.0
1.11k stars 112 forks source link

[FR] Make non-ASCII characters properly visible in file names inside Zip archives #531

Closed MayanKoyote closed 11 months ago

MayanKoyote commented 11 months ago

[Feature Request] Make non-ASCII characters properly visible in file names inside Zip archives.

Looks like that the version of zip/unzip currently using in CFW is unable to can to properly handle file names containing non-ASCII characters.

lost

Steps to Reproduce:

  1. Create zip archive (in Windows) with non-ASCII filenames inside;
  2. Copy this archive to Miyoo CFW;
  3. List files inside this archive with unzip.

There is a suspicion that this only applies to archives created in Windows and the zip/unzip version is to blame. There are rumors that so called "unreleased beta" versions can do this decently. For unzip, these are versions starting from 6.10b (latest 6.10c25c) and for zip - I'm not sure here, but latest can be 3.1e (3.1e21). http://antinode.info/ftp/info-zip/

Maybe it's possible to upgrade the version of zip/unzip and bring beauty and harmony to the output of the unzip -l command? Or maybe it's possible to switch zip to an alternative archiver, some kind of p7zip or even libarchive or something like that?

Apaczer commented 11 months ago

Thanks for noticing! Added full Unicode characters range support with CONFIG_LAST_SUPPORTED_WCHAR=0 in: https://github.com/MiyooCFW/buildroot/commit/1e06623e53f753d22c9511ae5f2adde2132871a7

MayanKoyote commented 11 months ago

Thanks, this helped, but only partially. I checked build d0c9a21 - CJK characters (I added files with names in Japanese and Korean) continue to appear as question marks, although there are fewer of them:


sh lister.sh

#!/bin/busybox sh
search_dir=/mnt/ln
for entry in "$search_dir"/*
do
 echo "$entry"
done

CJK01


Zip Viewer CJK02


sh ls_lister.sh

#!/bin/busybox sh
ls /mnt/ln

CJK03


It turns out that ls also cannot display such symbols.

What I was able to find: "starting from busybox 1.17.0 or above, Chinese cannot be displayed without modifying the ls command. If you want busybox1.17.0 or above to support Chinese, you need to modify two files: printable_string.c and unicode.c." https://topic.alibabacloud.com/a/solution-to-busyboxs-support-for-chinese-characters_8_8_32030280.html This is also mentioned here, in the README.md: https://github.com/mlzboy/busybox-1.25.1-armv7l Could this be it?

Apaczer commented 11 months ago

should be adressed with: https://github.com/MiyooCFW/buildroot/commit/cb9342a0f534b22056f43ba541133ec57dfb674c

MayanKoyote commented 11 months ago

Thanks, this helped:

CJK2-1 CJK2-2 CJK2-3