Free Republic
Browse · Search
General/Chat
Topics · Post Article

Skip to comments.

Strange characters showing up in FR posts -- here's a workaround
11/11/15

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)


TOPICS: Chit/Chat; Computers/Internet
KEYWORDS: faq; freerepublic; geany; html; internet; posting; quotes; workaround
Navigation: use the links below to view more comments.
first previous 1-2021-4041-51 next last
To: markomalley

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


21 posted on 11/11/2015 6:54:23 PM PST by Charles Henrickson
[ Post Reply | Private Reply | To 1 | View Replies]

To: Chickensoup

ClassyGreenEyedBlonde comes to mind.


22 posted on 11/11/2015 6:56:06 PM PST by FreedomPoster (Islam delenda est)
[ Post Reply | Private Reply | To 2 | View Replies]

To: Charles Henrickson

Nice...


23 posted on 11/11/2015 6:57:37 PM PST by markomalley (Nothing emboldens the wicked so greatly as the lack of courage on the part of the good -- Leo XIII)
[ Post Reply | Private Reply | To 21 | View Replies]

To: FreedomPoster

Yep, and the gunner, and of course Laz showed right up when the discussion turned to characters.


24 posted on 11/11/2015 7:00:16 PM PST by Chickensoup (We lose our freedoms one surrender at a time)
[ Post Reply | Private Reply | To 22 | View Replies]

To: Lazamataz

You are a strange character and there is no workaround available to deal with it.


25 posted on 11/11/2015 7:00:25 PM PST by centurion316 (,)
[ Post Reply | Private Reply | To 10 | View Replies]

To: FreedomPoster

There’s a name from the past - is ClassyGreenEyedBlonde still around?


26 posted on 11/11/2015 7:05:56 PM PST by MaskedMan
[ Post Reply | Private Reply | To 22 | View Replies]

To: Lazamataz

Take a ticket ... get behind me


27 posted on 11/11/2015 7:18:07 PM PST by knarf (I say things that are true .... I have no proof ... but they're true.)
[ Post Reply | Private Reply | To 10 | View Replies]

To: markomalley
There are problems with more than the characters you listed.

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)

28 posted on 11/11/2015 7:18:24 PM PST by LonePalm (Commander and Chef)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Lazamataz

Ha!! I was about to write “speaking of strange characters on FR, what are we going to do about Laz?”

I swear I was!


29 posted on 11/11/2015 7:18:26 PM PST by MNDude (God is not a Republican, but Satan is certainly a Democrat.)
[ Post Reply | Private Reply | To 10 | View Replies]

To: The_Media_never_lie

zot them


30 posted on 11/11/2015 7:21:23 PM PST by smokingfrog ( sleep with one eye open (<o> ---)
[ Post Reply | Private Reply | To 16 | View Replies]

To: markomalley

Nice find. Easy to use. Thanks.


31 posted on 11/11/2015 7:34:47 PM PST by Ray76
[ Post Reply | Private Reply | To 1 | View Replies]

To: markomalley; dayglored; ShadowAce; unixfox; All

Easier just to go here:

http://dan.hersam.com/tools/smart-quotes.html


32 posted on 11/11/2015 7:41:41 PM PST by Utilizer (Bacon A'kbar! - In world today are only peaceful people, and the muzlims trying to kill them)
[ Post Reply | Private Reply | To 1 | View Replies]

To: markomalley
Hopefully John will be able to fix the problem at the server side so that this isn't an issue, but in the interim, this would work. Using the Geany application to convert those special characters only takes a few seconds once you've installed it, so it's not too much of a hassle.

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?

33 posted on 11/11/2015 7:43:36 PM PST by plain talk
[ Post Reply | Private Reply | To 18 | View Replies]

To: smokingfrog

I do not have the power of zot vested in me.


34 posted on 11/11/2015 7:44:22 PM PST by The_Media_never_lie (The Bush family needs to just go away. The Clinton family needs just to go to prison.)
[ Post Reply | Private Reply | To 30 | View Replies]

To: MaskedMan

Long gone. Was none of the above, IIRC.


35 posted on 11/11/2015 7:46:05 PM PST by FreedomPoster (Islam delenda est)
[ Post Reply | Private Reply | To 26 | View Replies]

To: Utilizer; markomalley; dayglored; ShadowAce; unixfox
> Easier just to go here: http://dan.hersam.com/tools/smart-quotes.html

Wow, that's great, Utilizer! Bookmarked! Thanks!!

36 posted on 11/11/2015 7:48:17 PM PST by dayglored ("Listen. Strange women lying in ponds distributing swords is no basis for a system of government.")
[ Post Reply | Private Reply | To 32 | View Replies]

To: dayglored

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. :)


37 posted on 11/11/2015 8:06:26 PM PST by Utilizer (Bacon A'kbar! - In world today are only peaceful people, and the muzlims trying to kill them)
[ Post Reply | Private Reply | To 36 | View Replies]

To: Utilizer

And of course, BookMarked as well.

Just in case I lose track of the hard drive copy.


38 posted on 11/11/2015 8:08:06 PM PST by Utilizer (Bacon A'kbar! - In world today are only peaceful people, and the muzlims trying to kill them)
[ Post Reply | Private Reply | To 37 | View Replies]

To: markomalley

if you have windows paste first in notepad then copy paste from the notepad text.


39 posted on 11/11/2015 8:12:08 PM PST by Phillyred
[ Post Reply | Private Reply | To 1 | View Replies]

To: markomalley

bfl


40 posted on 11/11/2015 8:41:41 PM PST by granite (The heart of the wise inclines to the right, but the heart of the fool to the left - Ecclest 10:2)
[ Post Reply | Private Reply | To 1 | View Replies]


Navigation: use the links below to view more comments.
first previous 1-2021-4041-51 next last

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.

Free Republic
Browse · Search
General/Chat
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson