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

To: saminfl; John Robinson
I think they are supposed to be a code for apostrophes and other symbol for quotation marks, but why am I seeing them?

FR pages are supposed to be coded in UTF-8. That means you should be able to copy and paste Rooskie, Chinese, Arabic, whatever — not to mention curly quotes, em dashes, and funny apostrophes — and expect it to show up correctly in the user's browser.

That used to be true. However, in the last few days, something got broken in the FR server. Now, if you post UTF-8 (that matters — normal red-blooded American ASCII is also UTF-8, but doesn't need to be), you get garbage.

What appears to be happening is, the server scans posts for bytes falling outside the 7-bit ASCII range and substitutes HTML entities for each such byte. The result is a mess.

For instance, consider the word refugee enclosed in curly scare quotes, e.g., “refugee”. Have a closer look:

“refugee”

Notice that the open and close quotes have different shapes. That's why they are curly. In 7-bit ASCII, they would be the same — 7-bit ASCII can't represent curli-quotiness:

"refugee"

In the first example, in UTF-8, the curly quotes are each represented by three binary bytes. The left curly is e2 80 9c, and the right curly is e2 80 9d. When your browser encounters those sequences while operating in UTF-8 rendering mode, it correctly paints the left and right curlie shapes on your screen. IOW it just works.

However, if the recently introduced server bug gets a chance to intervene, it replaces e2, 80, 9c, and 9d with HTML entities representing those individual bytes. E.g.,

“refugeeâ€&#157

Your browser faithfully renders those corrupted entities, resulting in garbage:

“refugee”

A circumflexed a followed by a Euro symbol followed by whatever. LOL!

The fix is obviously to revert the recent change.

Did the change get introduced as a result of the recent Google malware scare?

36 posted on 10/31/2015 1:42:44 AM PDT by cynwoody
[ Post Reply | Private Reply | To 1 | View Replies ]


To: cynwoody

Quick question; would the Find/Replace command work?


39 posted on 10/31/2015 6:10:27 AM PDT by Cletus.D.Yokel (BREAKING: Boy Scouts of America Changes Corporate Identity to "Scouting for Boys in America")
[ Post Reply | Private Reply | To 36 | View Replies ]

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