Juan Jose Pablos wrote: > Pierre Bourgin escribió: >> >> the *.inf file(s) won't match if they are encoding in weird format >> like UTF-16 little endian, like bcmwl5.inf file provided by Dell >> 1[345][795]0 (mini)PCI wireless cards ( chipset broadcom PCI_DEV=4320). >> workaround: On this case, open file with MS-notepad then save it with >> "unicode" as file format (aka UTF-8): search-win-drivers.pl will >> "match it" . >> > > maybe iconv[1] could do the job. But something that can be done as a > utility script. > > [1] > http://www.gnu.org/software/libiconv/documentation/libiconv/iconv.1.html
thanks for the input. In fact, it seems that perl will be able to do the job, directly in search-win-drivers.pl in its opening .inf routine. By default, perl opens files as UTF-8. But we can request to open it as UTF-16le, and in this case (of an UTF-16 file), search/match operations seem to be fine. No auto-detection is performed with UTF-16le encoded files, and an UTF-8 encoded file has a weird content if opened as UTF-16. So I think about opening files as UTF-8 (as already done), check its first bytes to see if UTF-16(le) is used or not. If UTF-16(le), close the file and re-open it as UTF-16le. It will cost some extras I/O, but we should retrieve the right information ;-) BTW, sourceforge.net has about 2-3 days of delay to deliver emails to unattended-devel ML these days ?! Pierre ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ unattended-devel mailing list unattended-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/unattended-devel