URL: <http://savannah.gnu.org/patch/?func=detailitem&item_id=5221>
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 _______________________________________________________ Details: 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 accordingly. - 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 <http://savannah.gnu.org/patch/download.php?file_id=10291> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/patch/?func=detailitem&item_id=5221> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel