Unpack files with special characters

NZBGet is a cross-platform binary newsgrabber for nzb files, written in C . It supports client/server mode, automatic par-check/-repair and web-interface. NZBGet requires low system resources and runs great on routers, NAS-devices and media players. Includes nzbToMedia postprocess scripts.

Moderator: Lillian.W@AST

Post Reply
elstupid
Posts: 2
youtube meble na wymiar Warszawa
Joined: Sun Dec 11, 2022 6:37 pm

Unpack files with special characters

Post by elstupid »

The problem
After downloading and unpacking rar archives, which contain files with special characters, I'm left with truncated filenames, because unrar doesn't seem to handle the special characters.
Files 08 and 14 hereafter should have been named 08 Y Yo Qué Culpa Tengo.mp3 and 14 A Mi Tío Lele.mp3

Code: Select all

01 Venta Zoraida.mp3
02 Mi Tiempo (Bulerias).mp3
03 Veloz Hacia Su Sino.mp3
04 Buleria De La Mocita.mp3
05 Del Molinete.mp3
06 Pozo Del Deseo.mp3
07 La Voz Del Tiempo.mp3
08 Y Yo Qu
09 Bodas De Sangre.mp3
10 Serrana, Que Te Olvidara.mp3
11 Del Calvario.mp3
12 A Quen Contarle.mp3
13 Dicen De Mi.mp3
14 A Mi T
15 A Mi Manuel.mp3
16 Nana De Colores.mp3
17 Abuelo Pacote.mp3
NZBget is using unrar to unpack and my problem is very similar to this problem : https://superuser.com/questions/1673843 ... -using-the
However I can't seem to solve it. Anyone with same problem and having a solution?

What I tried
I'm really not into Linux, however I tried a few things:
  • running the unrar version supplied by NZBget, which is unrar 5.70:

    Code: Select all

    /usr/local/AppCentral/nzbget/nzbget/unrar x -y -p- -o+ /share/Download/NZBGet/dst/packed/7o
    ECYWmZPQKVOwcd8xg.part1.rar /share/Download/NZBGet/dst/test
    Result: truncated files
  • running the unrar version of ADM, which is 6.10:

    Code: Select all

     /opt/bin/unrar x -y -p- -o+ /share/Download/NZBGet/dst/packed/7oECYWmZPQKVOwcd8xg.part1.rar
     /share/Download/NZBGet/dst/test
    Result: good files, no truncation
So I thought of setting option for nzbget to unpack with /opt/bin/unrar. Result: still truncated files
I also tried to overwrite unrar of nzbget with the ADM version. Result: still truncated files

Thinking logically, the problem seems NZBget related or it has something to do with locale when NZBget is shelling out.
What I also tried is getting the locale, but from this link https://forum.asustor.com/viewtopic.php ... ale#p42881 I found that I have en_US.UTF8. Which should be okay?

Unrar seems to have an option for setting characerset -sc<chr> but unrar complains about an unrecognized switch then

Any help is appreciated!
elstupid
Posts: 2
Joined: Sun Dec 11, 2022 6:37 pm

Re: Unpack files with special characters

Post by elstupid »

So no one knows who to fix it yet. Anyone having the same problems then?
User avatar
Nazar78
Posts: 2003
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Unpack files with special characters

Post by Nazar78 »

I don't use NZBget nor unrar, perhaps you could try below:

Create a new script:

Code: Select all

sudo vi /usr/local/AppCentral/nzbget/nzbget/unrar.en_US.UTF-8
Contents:

Code: Select all

#!/bin/sh

LANG="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL="en_US.UTF-8"

/opt/bin/unrar "$@"
Make it executable:

Code: Select all

sudo chmod +x /usr/local/AppCentral/nzbget/nzbget/unrar.en_US.UTF-8
Point your unrar to "/usr/local/AppCentral/nzbget/nzbget/unrar.en_US.UTF-8" instead.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
Post Reply

Return to “NZBGet”