I am sick of wading through text documents which contain special characters which do not translate into html. Double quotes, apostrophes and certain other characters which look odd. How could I build a document which translates these into characters where there are no problems. The curly quotes and apostrophes do not translate properly. I would like to just create a text document which read correctly and eliminated these problem characters.
What are you trying to do exactly? Are you talking about web pages when you say "text document"?
I am storing all articles for a website in text files. From there they are made into webpages according to my current template. Some of these contain strange characters which do not appear correctly when viewed. Double quotes (the curly ones) are shown as question marks. Pound signs (as in £ - I am from the UK) are shown oddly. Its a text encoding question. This is especially the case with people writing on apples as they seem to use a different sets of quotes (curly quotes not straight ones).
What I want to do is to detect these rogue characters and then convert them to ones handled better.
There are numerous php functions that may satisfy your needs. Please supply a sample and your desired output.
This topic is now closed. New replies are no longer allowed.