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

Skip to comments.

What's wrong with "smart quotes" and possibly how to fix it (Vanity)
me

Posted on 11/19/2015 10:34:21 PM PST by some tech guy

So, I'm still seeing smart quotes mess up. There was a thread a little while ago whereby I said what the problem was, but it's still extant.

Here's the problem: All the web-tier stuff is using UTF-8 (which is a great idea), but *something*, probably the database tier, is using CP-1252.

I suspect either:

a) Database table for posts on SQL Server is set to collate and/or store the windows-1252/CP-1252 character set.

or

b) something between the web level and the DB level is doing character set interpretation in an incorrect way. There's 1252 in there somewhere, and that's what's breaking the quotes.


TOPICS: Computers/Internet; Focus Software
KEYWORDS:
Navigation: use the links below to view more comments.
first 1-2021-4041-48 next last
Just trying to be helpful.
1 posted on 11/19/2015 10:34:21 PM PST by some tech guy
[ Post Reply | Private Reply | View Replies]

To: some tech guy

http://stackoverflow.com/questions/2477452/%C3%A2%E2%82%AC-showing-on-page-instead-of


2 posted on 11/19/2015 10:34:39 PM PST by some tech guy (Stop trying to help, Obama)
[ Post Reply | Private Reply | To 1 | View Replies]

To: some tech guy

I’ll go further: the issue doesn’t occur on the front page, only when you view the thread. That’s where the problem is.


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

To: some tech guy

I haven’t used this yet, but it looks promising.

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


4 posted on 11/19/2015 10:42:13 PM PST by sparklite2 (Islam = all bathwater, no baby.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: some tech guy

I cant deny, I have sort of gotten used to not using apostrophes.


5 posted on 11/19/2015 10:42:25 PM PST by Slyfox (Will no one rid us of this meddlesome president?)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Slyfox

English has always been about merging languages and words. Just eschew punctuation and help move it along, like texting...


6 posted on 11/19/2015 10:44:18 PM PST by Paladin2 (my non-desktop devices are no longer allowed to try to fix speling and punctuation, nor my gran-mah.)
[ Post Reply | Private Reply | To 5 | View Replies]

To: some tech guy

How do [] {} () || work out?


7 posted on 11/19/2015 10:45:18 PM PST by Paladin2 (my non-desktop devices are no longer allowed to try to fix speling and punctuation, nor my gran-mah.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Slyfox
Don't have to live without 'em. Code for straight apostrophes is ' for the record. They're waitin' for all of us.
8 posted on 11/19/2015 10:45:24 PM PST by Olog-hai
[ Post Reply | Private Reply | To 5 | View Replies]

To: some tech guy

Don’t know what you’re talking about.


9 posted on 11/19/2015 10:46:31 PM PST by kevao (Biblical Jesus: Give your money to the poor. Socialist Jesus: Give your neighbor's money to the poor)
[ Post Reply | Private Reply | To 1 | View Replies]

To: kevao
’t€™â€™Ã¢â‚¬â„¢t’t’t’t€™â€™Ã¢â‚¬â„¢t’t’t’t€™â€™Ã¢â‚¬â„¢t’t’t’t€™â€™Ã¢â‚¬â„¢t’t’t’t€™â€™Ã¢â‚¬â„¢t’t’t’t€™â€™Ã¢â‚¬â„¢t’t’t’t€™â€™Ã¢â‚¬â„¢t’t’t

It's getting on my nerves.

10 posted on 11/19/2015 10:52:17 PM PST by Stentor ("The best lack all conviction, while the worst are full of passionate intensity.")
[ Post Reply | Private Reply | To 9 | View Replies]

To: All

Anyone check the radiator to see if it was full? I’m surprised people haven’t thought of that already...


11 posted on 11/19/2015 10:53:56 PM PST by tenger (Friends don't let friends eat lutefisk.)
[ Post Reply | Private Reply | To 9 | View Replies]

To: some tech guy; Admin Moderator; Jim Robinson
Pinging Jim.

1252 in the middleware.

12 posted on 11/19/2015 10:53:58 PM PST by Mariner (War Criminal #18 - Be The Leaderless Resistance)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Stentor
It's getting on my nerves.

You got an apostrophe through clean. That’s good for you!

13 posted on 11/19/2015 10:55:46 PM PST by kevao (Biblical Jesus: Give your money to the poor. Socialist Jesus: Give your neighbor's money to the poor)
[ Post Reply | Private Reply | To 10 | View Replies]

To: kevao
You got an apostrophe through clean.

I lost it. I hate myself. Oh well, there's butter pecan in the freezer.

14 posted on 11/19/2015 11:02:42 PM PST by Stentor ("The best lack all conviction, while the worst are full of passionate intensity.")
[ Post Reply | Private Reply | To 13 | View Replies]

To: some tech guy
I’ll go further: the issue doesn’t occur on the front page, only when you view the thread. That’s where the problem is.

The problem is only with posted stuff. The server thinks it knows better than the user.

The most trivial example is posting non-HTML containing quotes. The server converts them from straight-up 7-bit ASCII to left and right curlies (smart quotes). They display just fine.

Then somebody selects them, posts them as a quote, adds commentary, and submits. Now they are garbage! LOL!

The root of the problem is, the server is looking at the UTF-8 input and supplying HTML entities for each non-7-bit ASCII byte it sees.

E.g., for a left curly double quote (“), the UTF-8 hex is e2 80 9c. The server translates those three bytes to “, which come out as “, namely, small-a with a circumflex, the euro symbol, and the oe ligature.

The solution is to convert that mess back to the original Unicode “.

This can easily be done client-side, using JavaScript. You just need some user scripts. See here for thread viewing and here for posting.

15 posted on 11/19/2015 11:11:28 PM PST by cynwoody
[ Post Reply | Private Reply | To 3 | View Replies]

To: Stentor

The apostophe quote weird character makes us look incompetent, and defaces the great factual content here.
Sys Admin, please escalate and fix FR - America’s black box recorder of why she fell and what went wrong.


16 posted on 11/19/2015 11:15:11 PM PST by MarchonDC09122009 (When is our next march on DC? When have we had enough?)
[ Post Reply | Private Reply | To 10 | View Replies]

To: cynwoody

Interesting. I really think it’s 1252 somewhere, but your commentary also makes some sense. It could be some interaction between the markup translation, detranslation to raw characters, and retranslation to viewable.

The bit I find particularly interesting is that the smart quotes work on the front page, but break on the thread view.

Here’s my dump from copying smart quotes to a file (in a UTF-8 console) and hexdumping it:

[redacted]-imac:~ [redacted]$ hexdump ~/freep.txt
0000000 c3 a2 e2 82 ac 0a
0000006

That looks very much like the issue referenced on stackoverflow, which is why I suspect 1252 in there somewhere.


17 posted on 11/19/2015 11:18:31 PM PST by some tech guy (Stop trying to help, Obama)
[ Post Reply | Private Reply | To 15 | View Replies]

To: some tech guy

“smart quotes” is a term of microaggression. Whether a quote is smart or not, should depend on its source, not on its encoding. Just saying....


18 posted on 11/19/2015 11:20:54 PM PST by kevao (Biblical Jesus: Give your money to the poor. Socialist Jesus: Give your neighbor's money to the poor)
[ Post Reply | Private Reply | To 1 | View Replies]

To: kevao

What if the quotes are only pretending to be smart, but are actually vanilla? We should give them a safe space.


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

To: some tech guy

If the smart quotes are in black font, then yes. #blackfontsmatter


20 posted on 11/19/2015 11:30:33 PM PST by kevao (Biblical Jesus: Give your money to the poor. Socialist Jesus: Give your neighbor's money to the poor)
[ Post Reply | Private Reply | To 19 | View Replies]


Navigation: use the links below to view more comments.
first 1-2021-4041-48 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