I used Foxit PDF Reader to convert a PDF file to a TXT file. Most of the text is straightforwardly readable. A few symbols are not, depending on what software I use to view the file. Some characters were non-ASCII in the PDF file, such as N-dashes and ligatures for "fl" and "fi". My question is how to replace these with characters that are readable no matter which text editor or word processor one uses. For example, the byte sequence E2 80 93 represents an N-dash. I would like to replace this with a hyphen wherever it occurs in the TXT file. Is there a way of doing this in Python? Is there a hex editor that can do this? [Edited 24 Jan 2021:] I have found that UltraEdit can be used to do what I am trying to do straightforwardly. It suits my purposes. Thanks for the replies.
2.1m questions
2.1m answers
60 comments
57.0k users