POStudios Forum

The Royal Archives => Off-Topic => The Silver Age => Forum Questions and Suggestions => Topic started by: Yonkey on September 10, 2004, 05:38:33 PM

Title: Smart Quotes?
Post by: Yonkey on September 10, 2004, 05:38:33 PM
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).
Title: Smart Quotes?
Post by: Jeysie on September 10, 2004, 05:42:48 PM
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
Title: Smart Quotes?
Post by: Yonkey on September 10, 2004, 05:47:30 PM
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.
Title: Smart Quotes?
Post by: Yonkey 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.  ::)
Title: Smart Quotes?
Post by: 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
Title: Smart Quotes?
Post by: Yonkey on September 11, 2004, 08:09:46 AM
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
Title: Smart Quotes?
Post by: Jeysie 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
Title: Smart Quotes?
Post by: Yonkey 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
Title: Smart Quotes?
Post by: Jeysie on September 11, 2004, 08:58:26 AM
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
Title: Re:Smart Quotes?
Post by: Yonkey 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.
Title: Re:Smart Quotes?
Post by: Jeysie 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
Title: Re:Smart Quotes?
Post by: Yonkey 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;.
Title: Re:Smart Quotes?
Post by: Jeysie 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
Title: Re:Smart Quotes?
Post by: Yonkey 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
Title: Re:Smart Quotes?
Post by: Jeysie 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
Title: Re:Smart Quotes?
Post by: Yonkey 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.