Author Topic: Smart Quotes?  (Read 3169 times)

Offline Yonkey

  • Phoenix Honour Guard
  • ************
  • Posts: 18427
  • Gender: Male
  • Nothing ventured, nothing gained
Smart Quotes?
« on: September 10, 2004, 05:38:33 PM »
- Just got done fighting with changing my sig... sheesh. Would have been a lot simpler if the forum kept quotes as plain old quotes instead of trying to "smart quote" them. :P

Peace & Luv, Liz
I notice it only does that when you copy and paste text from Word (or some equivalent text-editor that displays smart quotes).
"A wish changes nothing. A decision changes everything."

Offline Jeysie

  • Omnipotent Being
  • *********
  • Posts: 4635
Smart Quotes?
« Reply #1 on: September 10, 2004, 05:42:48 PM »
I notice it only does that when you copy and paste text from Word (or some equivalent text-editor that displays smart quotes).

That's the thing. I thought that might be the case, so I tried retyping the quote marks, and it still did it.

Of course, now it has this thing where it's double line spacing between the paragraphs?

(sigh)

Peace & Luv, Liz

Offline Yonkey

  • Phoenix Honour Guard
  • ************
  • Posts: 18427
  • Gender: Male
  • Nothing ventured, nothing gained
Smart Quotes?
« Reply #2 on: September 10, 2004, 05:47:30 PM »
That's the thing. I thought that might be the case, so I tried retyping the quote marks, and it still did it.

Of course, now it has this thing where it's double line spacing between the paragraphs?

(sigh)

Peace & Luv, Liz
Whoa, your browser is doing this?  I've never had that happen to me before besides in Word.
"A wish changes nothing. A decision changes everything."

Offline Yonkey

  • Phoenix Honour Guard
  • ************
  • Posts: 18427
  • Gender: Male
  • Nothing ventured, nothing gained
Smart Quotes?
« Reply #3 on: September 10, 2004, 08:27:43 PM »
I don't think so.  I can't do smart quotes at all unless I copy them from somewhere else.  ::)
"A wish changes nothing. A decision changes everything."

Offline Jeysie

  • Omnipotent Being
  • *********
  • Posts: 4635
Smart Quotes?
« Reply #4 on: September 11, 2004, 07:57:25 AM »
I don't think so.  I can't do smart quotes at all unless I copy them from somewhere else.  ::)

How come so many posts on the forum apparently have encoded quotes and apostrophes, then? ???

Peace & Luv, Liz

Offline Yonkey

  • Phoenix Honour Guard
  • ************
  • Posts: 18427
  • Gender: Male
  • Nothing ventured, nothing gained
Smart Quotes?
« Reply #5 on: September 11, 2004, 08:09:46 AM »
I don't think so.  I can't do smart quotes at all unless I copy them from somewhere else.  ::)

How come so many posts on the forum apparently have encoded quotes and apostrophes, then? ???

Peace & Luv, Liz

None of "my" posts have them. <- see :P
"A wish changes nothing. A decision changes everything."

Offline Jeysie

  • Omnipotent Being
  • *********
  • Posts: 4635
Smart Quotes?
« Reply #6 on: September 11, 2004, 08:39:18 AM »
Actually, Yonkey, your quotes *are* encoded in that post... check this page's source code.

Peace & Luv, Liz
« Last Edit: September 11, 2004, 08:41:31 AM by Jeysie »

Offline Yonkey

  • Phoenix Honour Guard
  • ************
  • Posts: 18427
  • Gender: Male
  • Nothing ventured, nothing gained
Smart Quotes?
« Reply #7 on: September 11, 2004, 08:51:54 AM »
It says:
<br />None of &quot;my&quot; posts have them. &lt;- see

If I used smart quotes, it would looke like:
These quotes are very “smart”. <-see :P
"A wish changes nothing. A decision changes everything."

Offline Jeysie

  • Omnipotent Being
  • *********
  • Posts: 4635
Smart Quotes?
« Reply #8 on: September 11, 2004, 08:58:26 AM »
It says:
<br />None of &quot;my&quot; posts have them. &lt;- see

If I used smart quotes, it would looke like:
These quotes are very &#8220;smart&#8221;. <-see :P

Sorry, I got crossed up. I just meant, the forum has &quot; instead of simply " . (I have unencoded quotes on many of my webpages, and they display and validate just fine.) So when I put " in my sig block, the forum kept writing &quot; for them, and it sucked up all the "available characters" so the quote was getting cut off. (i.e. it was counting the letters in &quot; towards the character limit.) And that's what was causing me problems.

Edit: Interesting: Look what happened when I quoted your post.

Peace & Luv, Liz
« Last Edit: September 11, 2004, 08:59:37 AM by Jeysie »

Offline Yonkey

  • Phoenix Honour Guard
  • ************
  • Posts: 18427
  • Gender: Male
  • Nothing ventured, nothing gained
Re:Smart Quotes?
« Reply #9 on: September 11, 2004, 09:10:05 AM »
Ahh, now I see.  The reason the forum uses &quot; in places and " in others is because apostrophies and quotation marks are used in PHP a lot.  If you ever have them in a string you have to escape them.  

Then the forum stores the message into MySQL and since it doesn't use escape codes, it converts them to &quot;.  

As for the quote block, it seems to not recognize smart quote ASCII codes, same with the Search page's output.
"A wish changes nothing. A decision changes everything."

Offline Jeysie

  • Omnipotent Being
  • *********
  • Posts: 4635
Re:Smart Quotes?
« Reply #10 on: September 11, 2004, 09:16:41 AM »
Er, so unencoded quotes are OK in static HTML, but not OK in dynamic output? In HTML, you really only need to encode ampersands and angle brackets, which is why I got confused. :P

At any rate, it's sort of annoying/confusing that the forum counts the symbol encoding towards the sig character limit. :P Not to mention including the encoding in search page results output.

Peace & Luv, Liz

Offline Yonkey

  • Phoenix Honour Guard
  • ************
  • Posts: 18427
  • Gender: Male
  • Nothing ventured, nothing gained
Re:Smart Quotes?
« Reply #11 on: September 11, 2004, 09:53:40 AM »
Yeah, in most programming languages the " is a special character already used for string literals.  For example, lets say you had no quotes:

jeysieSignature = "I am a signature.";

But when you want to throw quotation marks in you'd get either:

jeysieSignature = "I am a signature.  But I also have &quot;quotes&quot;";

OR

jeysieSignature = "I am a signature.  But I also have \"quotes\"";

And like I said, all data (including signatures) is stored in a MySQL database, which doesn't understand that \" means display the quote so before storing it, the " turns into &quot;.
"A wish changes nothing. A decision changes everything."

Offline Jeysie

  • Omnipotent Being
  • *********
  • Posts: 4635
Re:Smart Quotes?
« Reply #12 on: September 11, 2004, 10:06:34 AM »
Ugh, no wonder I was always terrible at programming. Anytime you get into recursive nesting stuff like that my brain wants to explode. I like stuff linear and consistent. :P

Peace & Luv, Liz

Offline Yonkey

  • Phoenix Honour Guard
  • ************
  • Posts: 18427
  • Gender: Male
  • Nothing ventured, nothing gained
Re:Smart Quotes?
« Reply #13 on: September 11, 2004, 10:09:13 AM »
Hehe, it's not really recursive, it's just saying you can't use the " without escaping it first with a \. ;D
"A wish changes nothing. A decision changes everything."

Offline Jeysie

  • Omnipotent Being
  • *********
  • Posts: 4635
Re:Smart Quotes?
« Reply #14 on: September 11, 2004, 10:14:19 AM »
Does that work in javascript? I have some document.write stuff where I was forced to resort to using double single quotes to fake the look of double quotes. :P

Peace & Luv, Liz

Offline Yonkey

  • Phoenix Honour Guard
  • ************
  • Posts: 18427
  • Gender: Male
  • Nothing ventured, nothing gained
Re:Smart Quotes?
« Reply #15 on: September 11, 2004, 01:53:24 PM »
I think it works, I haven't really tried it myself.  If not, just use &quot; for quotation marks instead.
"A wish changes nothing. A decision changes everything."
 

anything