\u201c & \u201d appear instead of quotation marks

User Help for Mozilla Firefox
Post Reply
User avatar
Clueless in Seattle
Posts: 503
Joined: March 27th, 2006, 11:58 am
Location: duh!

\u201c & \u201d appear instead of quotation marks

Post by Clueless in Seattle »

I'm running Firefox 103.0.2 (64-bit) under Windows 10 21H2.

On some web pages Firefox displays quotation marks as \u201c and \u201d

Is there a way to correct this?
_____________
Will in Seattle
a.k.a. "Clueless"
User avatar
dickvl
Posts: 54145
Joined: July 18th, 2005, 3:25 am

Re: \u201c & \u201d appear instead of quotation marks

Post by dickvl »

Can you post a link to a publicly accessible page (no authentication required)?

It is possible that the page content was copied from another (eight bit) encoding that didn't support Unicode.
User avatar
Clueless in Seattle
Posts: 503
Joined: March 27th, 2006, 11:58 am
Location: duh!

Re: \u201c & \u201d appear instead of quotation marks

Post by Clueless in Seattle »

I'm afraid I can't recall which web page it turned up on this morning, so I'll have to wait until it happens again and then post a link.

Okay, Here's a page with lots of quoted text on it that shows multiple instances of the substitutions of \u201c & \u201d:

https://www.alternet.org/2022/08/trump- ... ign=11046
_____________
Will in Seattle
a.k.a. "Clueless"
User avatar
dickvl
Posts: 54145
Joined: July 18th, 2005, 3:25 am

Re: \u201c & \u201d appear instead of quotation marks

Post by dickvl »

I remember having seen this reported before with embedded tweets and this is a possible JavaScript bookmarklet to fix this.

Code: Select all

javascript:/*twitter:\uxxxx,\n*/void(document.querySelectorAll('blockquote.twitter-custom-tweet').forEach(e=>e.innerHTML=e.innerHTML.replace(/\\u([0-9a-f]{4})/g,r=>unescape(r.replace(/\\u([0-9a-f]{4})/,'%u$1'))).replace(/\\n/g,'\n')))
User avatar
therube
Posts: 21698
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: \u201c & \u201d appear instead of quotation marks

Post by therube »

Looks to me it is simply the manner in which the quoted parts were posted & how they are handled, displayed by the website.

The page source shows \u201c & \u201d.
Notice how the '&' is properly "encoded" (as '&' & then "rendered" as '&') .
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
User avatar
Clueless in Seattle
Posts: 503
Joined: March 27th, 2006, 11:58 am
Location: duh!

Re: \u201c & \u201d appear instead of quotation marks

Post by Clueless in Seattle »

Thanks for the replies, folks! But I have to confess that they are Greek to me.
Last edited by Clueless in Seattle on August 19th, 2022, 9:18 am, edited 1 time in total.
_____________
Will in Seattle
a.k.a. "Clueless"
User avatar
dickvl
Posts: 54145
Joined: July 18th, 2005, 3:25 am

Re: \u201c & \u201d appear instead of quotation marks

Post by dickvl »

Does using the bookmarklet work for you?

Note that some pages may load extra content if you scroll down and in such a case you need to invoke the bookmarklet more than once to process new content.
Post Reply