#!/usr/bin/perl # # $Id$ # # SGML LyX qoute entinity fix tool # # (P) & (C) 2002 by Peter Bieringer # # Published under the GNU GPL licence # # Takes SGML output exported by LyX and fix a bug regarding quote entinities # Don't know the reason what causes this, but it is wrong. # # Replaces: # “ -> " # ” -> " # # Changes: # 20020125: Initial release # 20020713: spelling fix # # Known bugs: # Entity must be in one line print STDERR "INF : Replacing special quotes entities\n"; while () { my $line = $_; chomp $line; #print "$line"; #print "\n"; if ($line =~ /“/) { print STDERR "<"; # Substitute $line =~ s/“/"/g; }; if ($line =~ /”/) { print STDERR ">"; # Substitute $line =~ s/”/"/g; }; print $line . "\n"; }; print STDERR "finished\n";