also sprach Joey Hess <jo...@debian.org> [2009.03.30.2335 +0200]: > I don't think that will behave better than currently. One encoding > or the other will be screwed up. If I apply the change below, the utf-8 > encoded filename will come through ok, but the other will be forced to > utf-8 and be mangled (to '�') in the process. > > --- a/vidir > +++ b/vidir > @@ -79,6 +79,7 @@ Licensed under the GNU GPL. > use File::Spec; > use File::Temp; > use Getopt::Long; > +use Encode; > > my $error=0; > > @@ -120,6 +121,7 @@ my $c=0; > foreach (@dir) { > next if /^(.*\/)?\.$/ || /^(.*\/)?\.\.$/; > $item{++$c}=$_; > + $_=encode_utf8(decode_utf8($_)); > print OUT "$c\t$_\n"; > } > @dir=();
I believe vidir might be able to use the locale to determine when to apply this heuristic? Have you considered iconv? -- .''`. martin f. krafft <madd...@d.o> Related projects: : :' : proud Debian developer http://debiansystem.info `. `'` http://people.debian.org/~madduck http://vcs-pkg.org `- Debian - when you have better things to do than fixing systems "writing a book is like washing an elephant: there no good place to begin or end, and it's hard to keep track of what you've already covered." -- anonymous
digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)