On 14/05/16 21:55, cs(a)zip.com.au wrote:
On 14May2016 18:25, Robin Laing <MeSat(a)TelusPlanet.net> wrote:
> I am trying to run par2 to repair an archive that has an apostrophe in
> the name. Not a single quote. This archive was created on Windows.
Is there any reason you can't just rename the file by hand, with "mv"?
Or is this to fix some automation?
Par2 will pull the file name from the par2 file that it is supposed to
repair. Par2 will run but if the file name is wrong, then it won't
repair the archive. I know that there are issues with the archive.
> File name should be
> Joe’s file.part01.rar
> If I do ls I get
> Joe?s file.part01.rar
> ls -b I get
> Joe\302\222s\ file.part01.rar
What are your locale settings? What does the output of "locale" say?
The locale settings affect several things; in particular it affects:
- what ls will show you, because it affects what "ls" considers a
- what your terminal displays for various byte sequences (this is
driven by the terminal emulator's idea of your local, not your shell,
but they should match)
- what your keystrokes mean
I have tried different locales with no success. Not sure of which one I
I cannot remember which other locale I have tried. If I knew what the
\302\222 locale came from or how they are encoded, then it would point
me in the right direction. I have searched to find out those codes with
no success. I know it is supposed to be a curly single quote.
> Running par2 *.par2 runs par2 cmdline but all the files are
> and par2 says all the files are missing.
> Target: "Joe’s file.part01.rar" - missing.
> Target: "Joe’s file.part02.rar" - missing.
> Target: "Joe’s file.part03.rar" - missing.
> Target: "Joe’s file.part04.rar" - missing.
That is very weird. Normally, saying "*.rar" should be a totally robust
thing to say. On the other hand, it is possible that those strings above
are from inside the archive specification, and that is why they are not
found: your files need renaming as you anticipate.
You are correct. They are what the par2 command is pulling from the
> Doesn't see the repair files either.
> How can I escape these characters or run the program? I have searched
> for a day to see how to run this program. I have seen others ask the
> same question as well.
> Is there a way to use 'exec' or another option?
> I have tried to change the terminal character set with no luck or just
> haven't found the correct character set yet.
> I cannot rename the files as the par2 and repair files look for the
> original file names.
> I don't even know how to enter the characters in the terminal.
> I notice if I look at the file name in a graphics file manager
> (dolphin), I just get a square with some unreadable code in it.
That means it is not decoding the filename into characters for which is
has a glyph. That just means that Windows was using some other codeset
whn it was saving the filenames into the archive. Windows is a bit of a
nightmare in this regard.
I have read that in my searches today.
> Same if I try to look at it in a directory listing from a
> I missing a font set for this and would that make it work better.
No. You've got a character encoding issue.
However, there is a way out. Get your error message above into your
terminal, specificly by running your command again to ensure it is
exact. Then use cut/paste in your terminal to effect 4 mv commands. So,
mv *.part01.rar '<paste-filename-1-from-the-error-message-here>'
- using the shell to match the _current_ first file with *.part01.rar
- you are typing a single quote, then pasting the filename from the
error message, then another single quote
Provided the desired filenames' quote _is_ an apostrophe and not an
ASCII single quote, you should be ok here. This is because your terminal
has transcribed the error string from par2, and hopefully that will be
This avoids figuring out how to type a weird filename.
There are other ways to approach this, but if this work it is probably
> As I cannot confirm the language the file was created in, I may be
> missing the correct font on my system to work with it as well.
This is not a font issue.
Try the above and report.
Cameron Simpson <cs(a)zip.com.au>
Well done Cameron. Thank you.
Moving the files did help. I don't know why I didn't try that before.
With everything else going on today, it must of slipped my mind. I
started going in circles. I know I tried to move the files late last
night but not with the paste like you suggested.
This will go in my notes for future reference if it happens again.
It is funny that the par2 program had no problem seeing the repair
volume files with the glyph but couldn't see the rar files with the glyph.
Again, thank you.