On 14May2016 18:25, Robin Laing <MeSat@xxxxxxxxxxxxxxx> 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?
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 printable
character
- 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
Running par2 *.par2 runs par2 cmdline but all the files are missing
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.
No matter...
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.
Same if I try to look at it in a directory listing from a program. Am 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, like this:
mv *.part01.rar '<paste-filename-1-from-the-error-message-here>'
so you're:
- 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 usable.
This avoids figuring out how to type a weird filename.
There are other ways to approach this, but if this work it is probably the
easiest.
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.
Cheers,
Cameron Simpson <cs@xxxxxxxxxx>
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
http://lists.fedoraproject.org/admin/lists/users@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org