UnRAR
-
admin
- Site Admin
- Posts: 66729
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
jupe
- Posts: 3478
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
Re: UnRAR
If eventually you choose to incorporate functionality via a dll file, this is a link to the 7Zip source which includes an example of using the 7z.dll (which does multi format extraction), unlike the UnRAR.dll though there seems to be little documentation for using it, only the small example of using it in c++.
https://www.7-zip.org/a/7z1805-src.7z
https://www.7-zip.org/a/7z1805-src.7z
-
highend
- Posts: 15004
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
-
admin
- Site Admin
- Posts: 66729
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
Leito
- Posts: 562
- Joined: 26 Sep 2016 15:37
- Location: Windows 10 1809 x64
Re: UnRAR
https://www.7-zip.org/license.txtThe licenses for files are:
1) 7z.dll:
- The "GNU LGPL" as main license for most of the code
- The "GNU LGPL" with "unRAR license restriction" for some code
- The "BSD 3-clause License" for some code
-
admin
- Site Admin
- Posts: 66729
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: UnRAR
OK, that's no problem at all.
So, for 19.50 I plan to look deeper into these nice little helpers...
So, for 19.50 I plan to look deeper into these nice little helpers...
FAQ | XY News RSS | XY X
-
highend
- Posts: 15004
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: UnRAR
You can just use 7z.exe (which uses the 7z.dll) to do what's required. It supports all packing formats, incl. rar
and btw, the filtering of the output can be shortened to:
and btw, the filtering of the output can be shortened to:
Code: Select all
$text = <<<>>>
7-Zip (a) 18.05 (x86) : Copyright (c) 1999-2018 Igor Pavlov : 2018-04-30
Scanning the drive for archives:
1 file, 571665 bytes (559 KiB)
Listing archive: E:\Test\Archives\7zip\Mongolia.7z
--
Path = E:\Test\Archives\7zip\Mongolia.7z
Type = 7z
Physical Size = 571665
Headers Size = 203
Method = LZMA:768k
Solid = +
Blocks = 1
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
2016-10-24 08:47:03 ....A 343262 571462 AeroMongolia.jpg
2018-10-23 15:07:35 ....A 244577 Burma_Shave_Tube.jpg
------------------- ----- ------------ ------------ ------------------------
2018-10-23 15:07:35 587839 571462 2 files
>>>;
$data = regexreplace($text, "(^7-Zip[\s\S]*?[-]{24}\r?\n)([\s\S]*?)(\r?\n[-]{19}[\s\S]*)", "$2");
$data = regexreplace($data, "^.{53}");
text $data;
One of my scripts helped you out? Please donate via Paypal
-
admin
- Site Admin
- Posts: 66729
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: UnRAR
Indeed, great!
Again it does not seem to support Unicode.
I begin to wonder if this is my bug... something wrong with runret...
Again it does not seem to support Unicode.
FAQ | XY News RSS | XY X
-
Marco
- Posts: 2354
- Joined: 27 Jun 2011 15:20
Re: UnRAR
Don, here's my test.
If I copy-paste that content in a text editor I get this:
So it "should" work. I didn't change codepage via chcp, but I changed the font used by console (right click on the title bar > properties > font type). I don't know why runret shows only ?s, I even tried changing codepage before launching the actual command in your first post.
If I copy-paste that content in a text editor I get this:
Code: Select all
Microsoft Windows [Versione 6.3.9600]
(c) 2013 Microsoft Corporation. Tutti i diritti riservati.
C:\Users\Marco>cd desktop
C:\Users\Marco\Desktop>"C:\Program Files\WinRAR\UnRar.exe" lb C:\Dati\Marco\Desk
top\日本人.rar
日本人.txt
C:\Users\Marco\Desktop>To see the attached files, you need to log into the forum.
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
-
admin
- Site Admin
- Posts: 66729
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
jupe
- Posts: 3478
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
Re: UnRAR
From my tests 7z.exe doesn't support UniCode, does anyone else have it working? (I tried as RAR4/5/7z packed files)
edit: oops just noticed Don already mentioned that

edit: oops just noticed Don already mentioned that
To see the attached files, you need to log into the forum.
-
admin
- Site Admin
- Posts: 66729
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: UnRAR
7zip itself supports Unicode, only the listing of the contents per commandline somewhere loses the information. It's interesting that the characters are replaced by "_" as opposed to the usual "?". Still a mystery but I'm sure it will be solved soon.
FAQ | XY News RSS | XY X
-
jupe
- Posts: 3478
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
Re: UnRAR
Yes that's what I meant, I shouldn't have used the word "support". So to me it looks like in the case of unrar it's a runret issue, but the 7zip listing is a 7zip problem that won't be fixable without 7zip code changes AFAICT or using the dll directly because I assume GUI 7z shows Unicode properly.
-
admin
- Site Admin
- Posts: 66729
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: UnRAR
Yes, I plan the thorough DLL approach for later. Right now I go for the quick and dirty.
FAQ | XY News RSS | XY X
XYplorer Beta Club