Re: Par2cmdline with non normal characters.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14/05/16 21:55, cs@xxxxxxxxxx wrote:
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?

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
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


I have tried different locales with no success. Not sure of which one I need.

LANG=en_CA.UTF-8
LC_CTYPE="en_CA.UTF-8"
LC_NUMERIC="en_CA.UTF-8"
LC_TIME=en_GB.UTF-8
LC_COLLATE="en_CA.UTF-8"
LC_MONETARY="en_CA.UTF-8"
LC_MESSAGES="en_CA.UTF-8"
LC_PAPER="en_CA.UTF-8"
LC_NAME="en_CA.UTF-8"
LC_ADDRESS="en_CA.UTF-8"
LC_TELEPHONE="en_CA.UTF-8"
LC_MEASUREMENT="en_CA.UTF-8" LC_IDENTIFICATION="en_CA.UTF-8"
LC_ALL=

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 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...

You are correct. They are what the par2 command is pulling from the par2 file.


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 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.
mkd>


Cheers,
Cameron Simpson <cs@xxxxxxxxxx>


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.

Robin
--
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



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux