Bug 323601 - Not handling French Characters
Not handling French Characters
Product: Fedora
Classification: Fedora
Component: par2cmdline (Show other bugs)
i386 Linux
low Severity low
: ---
: ---
Assigned To: Laurent Rineau
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-10-08 15:14 EDT by Brad
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-10-16 17:19:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Working example (104.71 KB, application/octet-stream)
2007-10-16 12:15 EDT, Brad
no flags Details

  None (edit)
Description Brad 2007-10-08 15:14:51 EDT
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.
Comment 1 Laurent Rineau 2007-10-16 10:52:27 EDT
Brad, can you submit a testcase? upstream is almost dead. I hope the issue is 
easily fixable using iconv functions.
Comment 2 Brad 2007-10-16 12:15:07 EDT
Created attachment 228931 [details]
Working example

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.
Comment 3 Laurent Rineau 2007-10-16 17:19:08 EDT
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.
Comment 4 Brad 2007-10-16 17:36:47 EDT
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)?


Comment 5 Laurent Rineau 2007-10-16 17:51:19 EDT
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 
encoded filenames.

I fully agree that it is far from being optimal, but adding Unicode support to 
par2cmdline is not a trivial job.
Comment 6 Brad 2007-10-16 18:04:16 EDT
Had to add the "--no test" but it worked.


Note You need to log in before you can comment on or make changes to this bug.