Unrar fails when accents are present in filenames
I have the rar
package installed. Double clicking on .rar
files opens the file in Archive manager. It works fine when folders or files use only characters with no accentuation, but if there is some accentuation present (inside the archives, not on the archive container filenames), then files that will open just fine in Windows using Winrar, 7zip or other archiver will produce an error message in Ubuntu.
The Archive Manager window will show the file list with wrong charsets, and trying to extract the files will produce two distinct errors:
If I double click the file:
RAR 4.00 beta 3 Copyright (c) 1993-2010 Alexander Roshal 17 Dec 2010
Shareware version Type RAR -? for help
Extracting from /media/folder/file.rar
No files to extract
If I use the extract command:
all the files in the archive will be extracted but (invalid encoding)
will be attached to the end of the folders and files with accentuation.
Solution 1:
Running unrar x /path/to/file .
will decompress the files with no encoding errors.
Apparently the issue is caused by the Archive Manager. (I'd really like to be able to use Archive Manager and the GUI, so if someone has a better answer I'll gladly accept it!)
Solution 2:
I had a similar problem with a .rar
file that contained non-standard Unicode symbols in the filenames. Solved it like this:
sudo apt install rar
rar e filename.rar
Solution 3:
Here these commands work fine and solved my problem.
first, install unrar on Ubuntu using the below commands.
sudo apt install unrar-free
sudo apt install unrar
Now extract your rar files using below commands
unrar x /path-where-rar-file-exist /path-you-want-to-extract
unrar x p1.rar /var/www/html/