0

Say I want to create a backup of folder MainFolder's content using rar. The command

rar a Backup.rar -r MainFolder

does the job.

BUT, if a subdirectory contains more than one file named with non-ASCII (?) characters, then only one of them is archived and the others get excluded.

For example, consider the following directory hierarchy (MainFolder, A and B are folders; a, b, and are files)

+MainFolder
   +A
      -a
      -b
      -你
      -好
   +B
      -a
      -b
   -a
   -b
   -你
   -好

then the command rar a Backup.rar -r MainFolder skips

MainFolder/A/好
MainFolder/好

while rar a Backup.rar -r MainFolder/* still skips

MainFolder/A/好

Why is it so? Any help is greatly appreciated, thanks!

For the record, I already encountered some issues with non-ascii characters (see this question) that other Linux distributions seem not to have. Anyway, I use Lubuntu 12.04, terminal is lxterminal and echo $BASH_VERSION returns 4.2.25(1)-release. rar version is 4.00 beta 3.

Another curiosity: right-clicking on the folder and selecting Compress... and then .rar still has the same problem. Other options (zip, tar...) behave correctly.

AndreasT
  • 361

1 Answers1

1

I think that your command will just work with UTF-8 enabled in the shell, so all you need to do is enable that. To do this run first the following command:

export LANG=en_US.UTF-8

To make the change permanently, add the above line in your ~/.bashrc file.

Radu Rădeanu
  • 174,089
  • 51
  • 332
  • 407