Jürgen Spitzmüller
Wed, 27 Jun 2007 00:06:46 -0700

Anders Ekberg wrote:
> + line=line.replace(' "',' ') #remove all qoutation marks w spaces before > + line=line.replace('" ',' ') #remove all qoutation marks w spaces after
> + line=line.replace(r'\"','"') #replace \" by " (for characters with
diaresis)

Is this sufficient? What about quotation marks before or after punctuation? What if you remove all quotation marks _but_ those following a backslash?

Jürgen

I see your point, but the replacement is only made in the unicodesymbols file (to store it in a dictionary which is used to replace the unicode symbols with commands). In that file, the only occurence of quotation marks is AFAIU surrounding commands (and pre- ambles) and in the actual commands. In the latter case they are on the form \" which I will need to replace with ".
So the two approaches will yield the same results for this case.

Anders


Reply via email to