[patch #5221] fix for several iso9660 charset problems


                 Summary: fix for several iso9660 charset problems
                 Project: GNU Midnight Commander
            Submitted by: egmont
            Submitted on: Sunday 07/02/2006 at 14:56
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open



Please apply the attached patch. It fixes the following problems regarding
charset selection in the iso9660 extfs plugin:

- The charset is taken from the output of "locale" (the LC_CTYPE line). This
line doesn't contain charset information if the locale env variables don't do
either. Example: LANG=hu_HU => the charset should be iso8859-2, but the
"locale" command doesn't output it, hence charset will not be passed to
isoinfo. The better way to determine the charset is to use "locale charmap".

- "locale charmap" has an advantage over the old method (greping the output
"locale"): it is already converted to a more standard form (every charset
name is converted to one particular spelling). However, this spelling still
doesn't match what isoinfo expects: "locale charmap" produces ISO-8859-2 (two
dashes) while isoinfo only understands iso8859-2 (first dash omitted). Hence
the output of "locale charmap" is further piped to a sed which changes this

- To detect whether a particular charset is accepted by isoinfo, the command
"isoinfo -j $CHARSET" is run. This immediately throws an error if the charset
is unknown. However, if it is known, it tries to open the default cdrom device
(I don't know why, this sounds an isofs bug, but still...) So this causes a
hang of several seconds, silly messages output to dmesg/syslog if no CD is
present in the tray, spinning up the CD if there's one, and so on... So
specify a different iso file (/dev/null in my patch, could also be "/" or
"/this/file/does/not/exist" or whatever). This way the plugin is much faster
if the charset is supported by isoinfo.


File Attachments:

Date: Sunday 07/02/2006 at 14:56  Name: extfs-iso9660-charset-fixes.patch 
Size: 886B   By: egmont
fix for several iso9660 charset problems


Reply to this item at:


  Message sent via/by Savannah

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