Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #12285 > unrolled thread

Transposing single and double quotes.

Started bySwifty <steve.j.swift@gmail.com>
First post2012-02-29 15:04 +0000
Last post2012-03-01 21:55 +0000
Articles 8 on this page of 28 — 11 participants

Back to article view | Back to comp.lang.javascript


Contents

  Transposing single and double quotes. Swifty <steve.j.swift@gmail.com> - 2012-02-29 15:04 +0000
    Re: Transposing single and double quotes. "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-02-29 17:27 +0200
      Re: Transposing single and double quotes. Swifty <steve.j.swift@gmail.com> - 2012-02-29 18:17 +0000
    Re: Transposing single and double quotes. Scott Sauyet <scott.sauyet@gmail.com> - 2012-02-29 07:28 -0800
    Re: Transposing single and double quotes. Jake Jarvis <pig_in_shoes@yahoo.com> - 2012-02-29 16:39 +0100
    Re: Transposing single and double quotes. Swifty <steve.j.swift@gmail.com> - 2012-02-29 18:27 +0000
      Re: Transposing single and double quotes. Swifty <steve.j.swift@gmail.com> - 2012-02-29 18:38 +0000
      Re: Transposing single and double quotes. KR <kristian.rasmussen@broadpark.no.spam.com> - 2012-02-29 19:45 +0100
        Re: Transposing single and double quotes. Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-02-29 19:59 +0100
          Re: Transposing single and double quotes. "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-02-29 22:28 +0000
            Re: Transposing single and double quotes. "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-03-01 07:52 +0200
              Re: Transposing single and double quotes. "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-03-01 07:54 +0000
                Re: Transposing single and double quotes. "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-03-01 10:18 +0200
                  Re: Transposing single and double quotes. "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-03-01 15:21 +0000
                    Re: Transposing single and double quotes. "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-03-01 18:07 +0200
                Re: Transposing single and double quotes. Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-03-01 10:30 +0100
                  Re: Transposing single and double quotes. "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-03-01 15:29 +0000
                  Re: Transposing single and double quotes. Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-03-01 22:10 +0100
                    Re: Transposing single and double quotes. Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-03-02 11:02 +0100
                      Re: Transposing single and double quotes. Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-03-02 13:17 +0100
                        Re: Transposing single and double quotes. Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-03-05 10:09 +0100
                    Re: Transposing single and double quotes. John G Harris <john@nospam.demon.co.uk> - 2012-03-02 16:27 +0000
                Re: Transposing single and double quotes. Dr J R Stockton <reply1209@merlyn.demon.co.uk> - 2012-03-02 22:05 +0000
                  Re: Transposing single and double quotes. "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-03-03 08:35 +0000
      Re: Transposing single and double quotes. "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-02-29 20:47 +0200
        Re: Transposing single and double quotes. Swifty <steve.j.swift@gmail.com> - 2012-03-01 07:19 +0000
      Re: Transposing single and double quotes. Gene Wirchenko <genew@ocis.net> - 2012-02-29 14:18 -0800
    Re: Transposing single and double quotes. Dr J R Stockton <reply1209@merlyn.demon.co.uk> - 2012-03-01 21:55 +0000

Page 2 of 2 — ← Prev page 1 [2]


#12410

FromErwin Moller <erwinmollerusenet@xs4all.nl>
Date2012-03-05 10:09 +0100
Message-ID<4f5482bc$0$6924$e4fe514c@news2.news.xs4all.nl>
In reply to#12343
On 3/2/2012 1:17 PM, Thomas 'PointedEars' Lahn wrote:
> Erwin Moller wrote:
>
>> Newsgroups are run by people.
>
> By many people, not just two of them.  All of them are potential readers.

And only a small portion of them have your personality problems, and 
most don't care if I start a posting addressed to the person I respond to.
If I wanted to email Evertjan (in this case) personally, I would have 
done so.
It is not very complicated, my dear Thomas.

>
>>>> […]
>>>> But "Quod" instead of "Quot" seems to mean:
>>>> "which is not the case", which makes sense.
>>>
>>> Do you mean that the Latin expression as such makes sense, or do you mean
>>> that it makes sense in this context?
>>
>> A false dichotomy. Try them elsewhere.
>
> It is not a dichotonomy.  It is trying to determine what you meant by that
> comment.

Fair enough.
By the way: The word is dichotomy, not dichotonomy.
I don't care too much for spelling mistakes, but you yourself are quite 
exact, and very fond of your Latin phrases, so I thought I let you know.


>
>> I mean it makes sense in the context used by Evertjan (in the sense that
>> it conveyed what he wanted to say)
>
> So, the former.
>
>> BUT I don't have a strong opinion about which of you is right (until I
>> read Korpela's response).
>
> Which show that you have not been paying attention.
>
>> So I am not stating you or Evertjan was right since you both know more
>> about the subject at hand than I do.
>
> You would react differently if you would answer truthfully about this.

You are wrong about that. I have no idea how to answer your not-so-open 
question more truthfully.

>
>>> Because if you mean the latter, you
>>> are mistaken, as is the pseudonymous address-munging author of the
>>> precursor of your posting (whom I had therefore killfiled long ago, but
>>> who does not appear to have noticed that).
>>
>> And yes, that "pseudonymous address-munging author" was the very same
>> person: me.
>
> No, it was not you.  For a start, you are (hopefully) not using a pseudonym.

You are wrong again.
That was me.
If you care: I started using a false email long long ago (and always the 
same email) because I started receiving loads of spam on my real email 
address and I didn't have a good spamfilter then.
I never saw much reason to change it into something existing. You are 
the only one that kept weeping about it for years: nobody else did.


>
>> Feel free to killfile erwinmollerusenet@xs4all.nl if that email address
>> doesn't pass your naming conventions too.
>
> Does that mean this is not an e-mail address either?

No, that doesn't follow (Or, as you prefer: "non sequitur").
It is an existing email address.
Feel free to send me one of your charming messages to check.

>
>> Furthermore I noticed you killfiled me when I had to correct the
>> nonsense you spread in comp.lang.php on a few occasions and you didn't
>> respond.
>
> Those are two fallacies, one of them ad hominem and (by intention) probably
> also ad populum.  Rest assured that you have no clue whom you are replying
> to.

Simply calling them fallacy doesn't change a thing.
You should know better, nicknaming yourself after Spock.
As for me not knowing you: I observe your behavior in newsgroups as 
anybody can. I think I have a pretty good picture of you after all the 
years, and it isn't very pretty.
It is a shame your personality gets so much in the way. If you behaved a 
little more civilized you could help a lot of people.
But I know this advice will fall on deaf ears.

>
>> But it suits me fine: Killfile to your heart's content.
>> Don't forget your Ninja Turtle's warcry when you are at it.
>> Or some Star Trek&quot;.
>
> I can see that you are not paying attention and cannot be reasoned with, so
> further consideration of your postings is most certainly a waste of time.

At last. Killfiled again.
What took you so long?
Maybe we can have this discussion again in 10 years from now, if I have 
some reason to post with a different email address.
Till then!


>> Luckily Jukka Korpela DID explain in this very thread when and why
>> &quot; gets interpreted as an entity reference.
>
> I had already explained it before.

Nope. You didn't as far as I can tell.
And in case you actually DID it, it was written too poorly for me to notice.

Regards,
Erwin Moller

>
>
> PointedEars


-- 
"That which can be asserted without evidence, can be dismissed without 
evidence."
-- Christopher Hitchens

[toc] | [prev] | [next] | [standalone]


#12347

FromJohn G Harris <john@nospam.demon.co.uk>
Date2012-03-02 16:27 +0000
Message-ID<QBIIQcEfTPUPFw0v@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD>
In reply to#12329
On Thu, 1 Mar 2012 at 22:10:39, in comp.lang.javascript, Thomas 
'PointedEars' Lahn wrote:

   <snip>
>Because if you mean the latter, you
>are mistaken, as is the pseudonymous address-munging author of the precursor
>of your posting (whom I had therefore killfiled long ago, but who does not
>appear to have noticed that).
   <snip>

It's a good job Thomas doesn't use statistics. He would have to refuse 
to use the Student's t distribution on the grounds that Student wasn't 
his 'real' name.

And he must avoid books by John le Carré, because that's not the 
author's 'real' name.

Is it living in a country that was conquered by Napoleon that makes 
people think a person has just one 'real' name? In England, your name is 
whatever you can persuade people to call you, and that can be different 
names by different people. People talk about changing their name by Deed 
Poll, but all that does is persuade the government to call you by a new 
name.

It's time Thomas stopped this misguided campaign against all aliases.

   John
-- 
John Harris

[toc] | [prev] | [next] | [standalone]


#12352

FromDr J R Stockton <reply1209@merlyn.demon.co.uk>
Date2012-03-02 22:05 +0000
Message-ID<F3tek5HeQUUPFwkb@invalid.uk.co.demon.merlyn.invalid>
In reply to#12319
In comp.lang.javascript message <XnsA0095AA00AB33eejj99@194.109.133.133>
, Thu, 1 Mar 2012 07:54:35, Evertjan. <exjxw.hannivoort@interxnl.net>
posted:

>
>And not "of cource", since it would be much nicer if html-parsing of the
>alert() string was done.

Since the alert display is now so horrible in Firefox and Opera, perhaps
you could contribute to the FAQ a substitute (not necessarily an exact
equivalent) function.  Using a new Window would allow Zoom to work, and
choice of font & colour too.

With HTML parsing the default, it should be easy enough to prevent it by
replacing & with &amp; throughout.


                Erwin : or <http://translate.google.com/>.

-- 
 (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk  Turnpike v6.05  MIME.
  Web  <http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms and links;
  Astro stuff via astron-1.htm, gravity0.htm ; quotings.htm, pascal.htm, etc.
 No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.

[toc] | [prev] | [next] | [standalone]


#12359

From"Evertjan." <exjxw.hannivoort@interxnl.net>
Date2012-03-03 08:35 +0000
Message-ID<XnsA00B618911A96eejj99@194.109.133.133>
In reply to#12352
Dr J R Stockton wrote on 02 mrt 2012 in comp.lang.javascript:

> In comp.lang.javascript message <XnsA0095AA00AB33eejj99@194.109.133.133>
> , Thu, 1 Mar 2012 07:54:35, Evertjan. <exjxw.hannivoort@interxnl.net>
> posted:
> 
>>
>>And not "of cource", since it would be much nicer if html-parsing of the
>>alert() string was done.
> 
> Since the alert display is now so horrible in Firefox and Opera, perhaps
> you could contribute to the FAQ a substitute (not necessarily an exact
> equivalent) function.  Using a new Window would allow Zoom to work, and
> choice of font & colour too.

As long as there is no maintainer tenant maintenant,
that would be quite difficult.

Also it would have to be mobile browser compatible. 
Ignoring mobile browsers is no longer an option for general solutions. 

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#12306

From"Jukka K. Korpela" <jkorpela@cs.tut.fi>
Date2012-02-29 20:47 +0200
Message-ID<jilrsd$6hv$1@dont-email.me>
In reply to#12303
2012-02-29 20:27, Swifty wrote:

> How, in HTML, would I enter
> the JavaScript necessary to get an alert popup:
>
> Please don't click the "Click" button again.
>
> Now, no matter what I choose as the opening quote, I'll run into a
> premature matching character in my text.

That would happen if the string is part of an (event) attribute. In that 
case, if you need to include both the Ascii apostrophe (') and the Ascii 
quotation mark in the same attribute value, then you need to use HTML 
escape for either of them, e.g.

title='Please don&#39;t click the "Click" button again'

If the string needs to appear between quotation marks in JavaScript 
code, like alert('...'), then things get even more inconvenient.

But you normally avoid these issues by placing JavaScript code in 
<script> elements, or better still in external files. Even if the event 
handler is simple, it may pay off to write it as a function, say

function alarm() {
   alert('Please don\'t click the "Click" button again');
}

and then the event attribute is simple, e.g. onclick="alarm()".


-- 
Yucca, http://www.cs.tut.fi/~jkorpela/

[toc] | [prev] | [next] | [standalone]


#12318

FromSwifty <steve.j.swift@gmail.com>
Date2012-03-01 07:19 +0000
Message-ID<d68uk7l6u5d48kjnh7hfmsv0urq1g98pup@4ax.com>
In reply to#12306
On Wed, 29 Feb 2012 20:47:43 +0200, "Jukka K. Korpela"
<jkorpela@cs.tut.fi> wrote:

>In that 
>case, if you need to include both the Ascii apostrophe (') and the Ascii 
>quotation mark in the same attribute value, then you need to use HTML 
>escape

Thankyou again for finishing off my problem. 

In almost every case, I'll use your “direct character” approach, as
with the AllChars program it is simple to insert such characters once
you've learned the sequences (`` and '' in this case, preceded by the
trigger key).

In the remaining few cases, my CGI scripts will easily translate
"don't" into "don&#39;t"

   String = changestr("'",string,"&#39;")

My scripting language also has a c2d() function which turns a
character into its decimal ASCII equivalent, so writing an "all
purpose" subroutines is a snip.

-- 
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk

[toc] | [prev] | [next] | [standalone]


#12310

FromGene Wirchenko <genew@ocis.net>
Date2012-02-29 14:18 -0800
Message-ID<ku8tk712dklcru97oqp4t7jdht9v7o4mbq@4ax.com>
In reply to#12303
On Wed, 29 Feb 2012 18:27:01 +0000, Swifty <steve.j.swift@gmail.com>
wrote:

[snip]

>I apologise if this has turned into an HTML question, but with my
>level of understanding, I have no way of determining this.

     Great!  Someone newer than I am at the game!

     You got stuck on another one of Those Things.  It is nice to have
someone look over your code.  Keep posting.

Sincerely,

Gene "still {b|st}umbling but not quite so much now" Wirchenko

[toc] | [prev] | [next] | [standalone]


#12335

FromDr J R Stockton <reply1209@merlyn.demon.co.uk>
Date2012-03-01 21:55 +0000
Message-ID<Ip79DISZB$TPFwM4@invalid.uk.co.demon.merlyn.invalid>
In reply to#12285
In comp.lang.javascript message <u8fsk7h2shahn6niukmv2mb89ekmllhtbe@4ax.
com>, Wed, 29 Feb 2012 15:04:54, Swifty <steve.j.swift@gmail.com>
posted:

>Take a look at http://swiftys.org.uk/click.html and then try clicking
>the button; you'll get an alert.
>
>Next, try to change the single quotes in the alert box to double
>quotes.
>
>My first attempt was to replace \' with \" but this caused the alert
>not to pop up. See http://swiftys.org.uk/click_ss.html


Whenever in doubt, use _within_ the JavaScript string \x22 and \x27 to
represent " and ' .

As an ultimate last resort, you can use string,fromCharCode(,,,,,);.

-- 
 (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk  Turnpike 6.05  WinXP.
 Web  <http://www.merlyn.demon.co.uk/> - FAQ-type topics, acronyms, and links.
 Command-prompt MiniTrue is useful for viewing/searching/altering files. Free,
 DOS/Win/UNIX now 2.0.6; see <URL:http://www.merlyn.demon.co.uk/pc-links.htm>.

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.javascript


csiph-web