Main Menu

Smart Quotes?

Started by Yonkey, September 10, 2004, 05:38:33 PM

Previous topic - Next topic

Yonkey

Quote from: Jeysie on September 10, 2004, 05:36:02 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."

Jeysie

Quote from: Yonkey on September 10, 2004, 05:38:33 PMI 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

Yonkey

Quote from: Jeysie on September 10, 2004, 05:42:48 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."

Yonkey

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."

Jeysie

Quote from: Yonkey on September 10, 2004, 08:27:43 PMI 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

Yonkey

Quote from: Jeysie on September 11, 2004, 07:57:25 AM
Quote from: Yonkey on September 10, 2004, 08:27:43 PMI 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."

Jeysie

#6
Actually, Yonkey, your quotes *are* encoded in that post... check this page's source code.

Peace & Luv, Liz

Yonkey

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."

Jeysie

#8
Quote from: Yonkey on September 11, 2004, 08:51:54 AMIt 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

Yonkey

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."

Jeysie

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

Yonkey

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."

Jeysie

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

Yonkey

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."

Jeysie

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

Yonkey

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."