Red Hat Bugzilla – Bug 323601
Not handling French Characters
Last modified: 2007-11-30 17:12:17 EST
Description of problem:Some of the rar files I get are from French speakers. If
the files have non-english characters (Ã©) the par2 cannot find either the par
files or the rar file. Files from the same source without these character behave
Version-Release number of selected component (if applicable):0.4-11
How reproducible: Try to verify or repair files with the foreign (?) characters.
Steps to Reproduce:
1.par2 v filename
Actual results:file not found
Expected results: verify file.
Additional info: Running a standard US install.
Brad, can you submit a testcase? upstream is almost dead. I hope the issue is
easily fixable using iconv functions.
Created attachment 228931 [details]
Here is a .nzb with a bad problem file name. The file reassembles and plays
just fine but the verification or repair does not work.
Actually, par2 processes file names as a byte stream. If your local system
encodes filenames differently from the system on which the par2 files has been
created, par2verify cannot find the files.
You have several options:
- use same locale as the people that created the par2 files,
- recode filenames locally, using "mvconv", for example. That tool is
packaged in Fedora.
Upstream par2cmdline needs to create and process the optional PAR 2.0 packet
named "PAR 2.0\0UniFileN" (see the PAR 2.0 specification).
I cannot fix that bug without upstream help, which is apparently dead.
I think the tool you mean is convmv? If so, it just changes the name of the
files, which is not the problem. I THINK the problem is that the par2 file goes
looking for the file with the "goofy" character(coded within the par) and when
it does not find that exact character it fails. So:
1.Without contacting the originator how do I determine the encode used?
2. How do I change the locale in a manner that does not prevent me from using
the system(I do not R/W French)?
You can use:
convmv --nosmart -f utf8 -t iso-8859-1 *
on the files before calling par2, then use:
convmv -f iso-8859-1 -t utf8 *
The first command will convert the utf8 encoded filenames into latin-1
encoding (eg. "Ã©" instead of "é"). Your par2 files seems to look for latin-1
I fully agree that it is far from being optimal, but adding Unicode support to
par2cmdline is not a trivial job.
Had to add the "--no test" but it worked.