Posted on 11/11/2015 6:35:44 PM PST by markomalley
I don't know if this has impacted anybody else, but in recent weeks, I've noticed that HTML special characters are not rendering properly in HTML posts.
For example, the character “ is rendering as ââ¬Å, the character ” is rendering as ââ¬Â, and so on.
A screenshot of a typical thread is here:
Needless to say, that is really irritating.
There is a workaround for this: replace these special characters with their corresponding HTML codes.
The ones that FR is currently having problems with are as follows:
‘ | "left single quote" | ‘ |
’ | "right single quote" | ’ |
“ | "left double quote" | “ |
” | "right double quote" | ” |
— | "em-dash" | — |
– | "en-dash" | – |
… | "ellipsis" | … |
You can do a global search and replace with pretty much any decent text editor out there.
However, in my experience, I've seen that it takes a few passes to catch all of the special characters in a document. You may need to do up to 7 passes in order to catch all of the characters.
This makes for a decent looking post, but it is a lot of repetition.
And I'm lazy.
Since I'm lazy, I did a little bit of research in order to figure out a "constructive" way to be lazy in this situation. I was looking for a text editor, similar to Notepad++, that supports macros (since I'm on Linux, I can't use Notepad++, except under Wine).
In doing my research, I think that I've found the solution that does EXACTLY what we need: Geany. Geany is a simple IDE environment that is supported under Linux, Windows, and Mac OSX. There is a plugin written for this editor / IDE that will automatically replace HTML special characters like the ones above with the applicable HTML code, thus eliminating our problems in one fell swoop!
In order to use this capability, the first step is to download and install the software (open source). Be sure to install both the software and the plugins.
The user interface:
First, you need to enable the appropriate plugin. Open up the plugin manager window by selecting "Tools" -- "Plugin Manager":
Then select the "HTML Characters" plugin:
To use this editor / IDE, you will want to paste in the text you wish to be "fixed".
Select all of the text that you've pasted into the environment ([ctrl]-A).
Then click on "Tools" -- "HTML Replacement" -- "Replace Characters in Selection"
And, Voila, all the problematic special characters in the text have been replaced with the corresponding HTML code.
(Note that if you were using plain text, you will now need to put a paragraph tag "<p>" at the beginning of each paragraph for it to format properly)
Here’s the tool I used today in posting an article. It worked great, and it was quick and easy:
http://dan.hersam.com/tools/smart-quotes.html
ClassyGreenEyedBlonde comes to mind.
Nice...
Yep, and the gunner, and of course Laz showed right up when the discussion turned to characters.
You are a strange character and there is no workaround available to deal with it.
There’s a name from the past - is ClassyGreenEyedBlonde still around?
Take a ticket ... get behind me
All of the special characters in my signature block are workarounds.
For example, é, is correctly rendered by inserting &_eacute; (without the underscore) in the HTML.
"Ceterum censeo 0bama esse delendam."
Garde la Foi, mes amis! Nous nous sommes les sauveurs de la République! Maintenant et Toujours!
(Keep the Faith, my friends! We are the saviors of the Republic! Now and Forever!)
LonePalm, le Républicain du verre cassé (The Broken Glass Republican)
Ha!! I was about to write “speaking of strange characters on FR, what are we going to do about Laz?”
I swear I was!
zot them
Nice find. Easy to use. Thanks.
Mark I am not sure you answered my question .. at least not directly. To confirm .. each user would run this program on each article they read (assuming they wish to do so). Yes or No?
I do not have the power of zot vested in me.
Long gone. Was none of the above, IIRC.
Wow, that's great, Utilizer! Bookmarked! Thanks!!
Welcome, mate. Although I am not the original poster of this information (Charles Henrickson is in post #21), I feel this is a very handy tool and we should pass the word on it for future reference.
I already have it saved to hard drive for future reference. :)
And of course, BookMarked as well.
Just in case I lose track of the hard drive copy.
if you have windows paste first in notepad then copy paste from the notepad text.
bfl
Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.