unrar: filename with German special characters

Get help, report and discuss bugs.
Post Reply
rolmei
Posts: 44
Joined: 13 Apr 2013, 15:52

unrar: filename with German special characters

Post by rolmei » 10 Feb 2017, 17:38

Hallo.
i know this is the nzbget forum and not the unrar forum, but perhaps somebody know the answer:

I have nzb file with german special characters in the filename (look attachment). Now unrar can not extract.

Some ideas?

THX
Roland

hugbug
Developer & Admin
Posts: 7401
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: unrar: filename with German special characters

Post by hugbug » 10 Feb 2017, 18:33

No attachment.
Please also post the full log of nzb-file download (history -> click on item -> button log -> save to file.
What is your OS, nzbget version, hardware?

rolmei
Posts: 44
Joined: 13 Apr 2013, 15:52

Re: unrar: filename with German special characters

Post by rolmei » 11 Feb 2017, 14:25

THX
Here are twio examples.
The nzb file with extension jpg, otherwise no upload
Attachments
Brigitte Woman - Maerz 2017.log
(4.67 KiB) Downloaded 68 times
Brigitte Woman - Maerz 2017.jpg
Brigitte Woman - Maerz 2017.nzb.log
(35.28 KiB) Downloaded 77 times

rolmei
Posts: 44
Joined: 13 Apr 2013, 15:52

Re: unrar: filename with German special characters

Post by rolmei » 11 Mar 2017, 22:20

No ideas

rolmei
Posts: 44
Joined: 13 Apr 2013, 15:52

Re: unrar: filename with German special characters

Post by rolmei » 11 Aug 2019, 13:34

Where is the log of unrar?

sanderj
Posts: 140
Joined: 10 Feb 2014, 21:46

Re: unrar: filename with German special characters

Post by sanderj » 11 Aug 2019, 14:52

Hi rolmei,

First of all; on what OS does your nzbget run?

On Linux, I can confirm what you describe. The cause is the resulting pdf file contains a Unicode character in the filename: c3 a4, which is Unicode U+00E4 aka ä

Probable cause: the ENV variable LANG (for "language") that is 'actual' when nzbget calls unrar:
* when env var LANG set to en_US.UTF-8 unrar works OK.
* when env var LANG set to C, the filename is cut off
See below.

Solution / workaround:
I tried "env LANG=en_US.UTF-8 ./nzbget -s", but that didn't work
I tried setting UnrarCMD to "env LANG=en_US.UTF-8 ${AppDir}/unrar", but that didn't work either.

So I think the help of hugbug is needed: I think nzbget should set "LANG=en_US.UTF-8" with calling unrar.
With these C++ snippets I'm able to reproduce & correct the problem:

Code: Select all

	system("env LANG=C unrar x -y  *part01.rar");
	system("env LANG=en_US.UTF-8 unrar x -y  *part01.rar");
Until then: do a manual unrar like below.


Good:

Code: Select all

$ env LANG=en_US.UTF-8 unrar x -y  *part01.rar

UNRAR 5.71 freeware      Copyright (c) 1993-2019 Alexander Roshal


Extracting from Brigitte Woman - Maerz 2017.part01.rar

Extracting  Brigitte Woman - März 2017.pdf                            14%

Extracting from Brigitte Woman - Maerz 2017.part02.rar

...         Brigitte Woman - März 2017.pdf                            28%

Extracting from Brigitte Woman - Maerz 2017.part03.rar

...         Brigitte Woman - März 2017.pdf                            42%

Extracting from Brigitte Woman - Maerz 2017.part04.rar

...         Brigitte Woman - März 2017.pdf                            56%

Extracting from Brigitte Woman - Maerz 2017.part05.rar

...         Brigitte Woman - März 2017.pdf                            71%

Extracting from Brigitte Woman - Maerz 2017.part06.rar

...         Brigitte Woman - März 2017.pdf                            85%

Extracting from Brigitte Woman - Maerz 2017.part07.rar

...         Brigitte Woman - März 2017.pdf                            99%

Extracting from Brigitte Woman - Maerz 2017.part08.rar

...         Brigitte Woman - März 2017.pdf                            OK 
All OK
Not good:

Code: Select all

$ env LANG=C unrar x -y  *part01.rar

UNRAR 5.71 freeware      Copyright (c) 1993-2019 Alexander Roshal


Extracting from Brigitte Woman - Maerz 2017.part01.rar

Extracting  Brigitte Woman - M?rz 2017.pdf                            14%

Extracting from Brigitte Woman - Maerz 2017.part02.rar

...         Brigitte Woman - M?rz 2017.pdf                            28%

Extracting from Brigitte Woman - Maerz 2017.part03.rar

...         Brigitte Woman - M?rz 2017.pdf                            42%

Extracting from Brigitte Woman - Maerz 2017.part04.rar

...         Brigitte Woman - M?rz 2017.pdf                            56%

Extracting from Brigitte Woman - Maerz 2017.part05.rar

...         Brigitte Woman - M?rz 2017.pdf                            71%

Extracting from Brigitte Woman - Maerz 2017.part06.rar

...         Brigitte Woman - M?rz 2017.pdf                            85%

Extracting from Brigitte Woman - Maerz 2017.part07.rar

...         Brigitte Woman - M?rz 2017.pdf                            99%

Extracting from Brigitte Woman - Maerz 2017.part08.rar

...         Brigitte Woman - M?rz 2017.pdf                            OK 
All OK

hugbug
Developer & Admin
Posts: 7401
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: unrar: filename with German special characters

Post by hugbug » 11 Aug 2019, 19:16

What about

Code: Select all

export LANG=en_US.UTF-8
./nzbget -s
?

Otherwise a stub-script to launch unrar can be used. Create script unrar.sh and set it into option UnrarCmd. An example script:

Code: Select all

#!/bin/sh 

DIR=`pwd`
echo "current dir: $DIR"
echo "unrar start command: unrar $@"

# here calling unrar
unrar "$@"
UNRAR_EXIT_CODE=$?
echo "unrar exit code: $UNRAR_EXIT_CODE";

# return exit code captured from unrar
exit $UNRAR_EXIT_CODE
This is just example, please add necessary commands to set LANG before executing unrar.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests