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

To: cynwoody

Oh yeah! UTF-8 always and often!

I checked out your markup theory. On the main page, the smart quotes related to this thread:

http://www.freerepublic.com/focus/f-news/3362771/posts

are *not* &# or &something markup. They’re straight UTF-8, and work.

[redacted]-imac:~ [redacted]$ hexdump freep2.txt
0000000 e2 80 9d 0a
0000004

But when you click the link, all the quotes are messed up.

I’ve a soft spot for 8859-1, but once you go UTF-8, you never go back.


22 posted on 11/19/2015 11:37:57 PM PST by some tech guy (Stop trying to help, Obama)
[ Post Reply | Private Reply | To 21 | View Replies ]


To: some tech guy
Were you viewing the actual content of the HTML page or your browser's rendition of it?

It's slippery. E.g., View Page Source will give different results from View Selection Source. The actual page, downloaded using a non-browser such as wget, may show entities, whereas the likes of View Selection Source or cut and paste into your favorite hex dumper will show clean UTF-8.

If I copy from the browser window, and paste through xxd, I see UTF-8. But, if I look at the actual HTML, I see entities. That is the key to the problem.

26 posted on 11/19/2015 11:58:40 PM PST by cynwoody
[ Post Reply | Private Reply | To 22 | View Replies ]

To: some tech guy

Is it possible that there is a problem using magic quotes or similar on the code that is storing in utf8 and then some sort of caching that is causing the conversion outside of the database? I seem to remember WordPress having a similar issue when they tried an update in the 2.0s that was security related.


40 posted on 11/20/2015 1:35:59 AM PST by willyd (I for one welcome our NSA overlords)
[ Post Reply | Private Reply | To 22 | View Replies ]

To: some tech guy

My text is UTF-8 by default.

But then, how’s this happening?


42 posted on 11/20/2015 2:01:34 AM PST by John Valentine (Deep in the Heart of Texas)
[ Post Reply | Private Reply | To 22 | 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