From: Tad McClellan on 22 Jan 2007 22:20 Ian <ianaturner(a)gmail.com> wrote: > I won't be coming back Thank you for improving our newsgroup. -- Tad McClellan SGML consulting tadmc(a)augustmail.com Perl programming Fort Worth, Texas
From: Brian McCauley on 23 Jan 2007 08:14 On Jan 19, 1:02 pm, "Cloink" <Cloink_Frigg...(a)ntlworld.com> wrote: > Look Brian clever clogs McCauley, I spent hours trawling the web, don't > come your "You haven't tried hard enough," sneering down your nose at > me. The FAQ. THE faq. Which one? I frequently ask myself "Why o > why?" but I don't think you meant that FAQ. Sorry about that. As others have pointed out "The FAQ" (without further qualification) in a Perl newsgroup means "The Perl FAQ". Sometimes we forget that this is not as blinding obvious to everyone as it seems to us. > I am encoding using > standardised javascript functions. I searched on those functions. I > found nothing useful. I think I've missed something here? What was it you were looking for? A description of what those functions do? That's what you appeared to be asking. You were asking a question about Javascript in a Perl newsgroup. You also asked for a Perl function that was the reverse - and that you were promptly given in another branch of this thread by Michele Dondi (with further clarification from me). > Sorry if I used the wrong terminolgy when I said W3C, Er? Who said you were wrong? http://www.w3.org/International/O-URL-code.html > Do you really need a link to the ECMAscript v3 definition of > encodeURI/encodeURIComponent/decodeblahblah when you can look it up in > the Rhino book? What makes you think I have the Rhino book? Anyhow I can look them up on the ECMA website and that does appear to answer your question. I'm a little bemused that you are criticising me for not bothering to make the trivial effort to look up the exact same information that you were seeking. If it's trivial for me why should it be non-trivial for you? > So if that's > the way that javascript encodes it, bearing in mind that javascript > communicates http requests with Perl a zillion times a day on the > tinterweb, how come I'm finding it so hard to find a reference to a > Perl function that decodes via the reverse algorithm? Dunno, why you found it hard so find. Like I said it's a FAQ. > Talking of algorithms, the only almost-useful bit of your reply doesn't > actually explain the algorithm by which one reaches xC3xA9 from u00E9. > Which would've been nice. Sorry, yes, guilty as charged. I only gave you the _name_ of the algorithm "utf-8" (as, of course, does the description encodeURIComponent on the ECMA site and the description of international URI encoding on the W3C site). I accept that it would have been a good idea to have included a pointer to an explaination of utf-8. (It would of course have been wasteful to have pasted the whole explaination into usenet). http://en.wikipedia.org/wiki/Utf8 However I only feel very sighly guilty about this. Putting "utf8" or "utf-8" into google and hitting "I feel lucky" takes me directly to the Wikipedia entry.
From: Brian McCauley on 23 Jan 2007 13:15 On Jan 22, 9:12 am, "Ian" <ianatur...(a)gmail.com> wrote: [ rudeness ] > NONE of you actually came up with the answer, did you?). > [..] don't bother with [...] replies, I won't be coming back to > read them) Well the OP isn't comming back (and we won't loose sleep over that) but just for my own sanity would any on-lookers like to verify that where weren't, in fact, any questions that the OP asked in this thread that weren't answered by several people. I'm fairly sure my first two posts in this thread answered everything the OP asked and more. Can anyone imagine how the OP could justify the assertion "NONE of you actually came up with the answer". Sometimes people get like this because they expect to be spoon-fed the answer, but in this case even that doesn't explain it because I _did_ spoon-feed him the answer: use Encode; use URI::Escape qw(uri_unescape); my $decoded = decode_utf8 uri_unescape $encoded;
From: Charlton Wilbur on 23 Jan 2007 16:05 >>>>> "BMcC" == Brian McCauley <nobull67(a)gmail.com> writes: BMcC> I'm fairly sure my first two posts in this thread answered BMcC> everything the OP asked and more. Can anyone imagine how the BMcC> OP could justify the assertion "NONE of you actually came up BMcC> with the answer". Sometimes people get like this because BMcC> they expect to be spoon-fed the answer, but in this case BMcC> even that doesn't explain it because I _did_ spoon-feed him BMcC> the answer: [snip answer] I've seen this happen often; someone asks a basic question, and one person spoon-feeds an answer while others admonish him for not checking the FAQ; the person focuses on the admonishment and completely misses the answer. Alternately, the OP was a clueless twit, incapable of recognizing an answer even when spoon-fed to him. Given how he responded, either theory works. Charlton -- Charlton Wilbur cwilbur(a)chromatico.net
From: Mark Donovan on 24 Jan 2007 15:15
On 1/23/07 14:05, "Charlton Wilbur" <cwilbur(a)chromatico.net> wrote: >>>>>> "BMcC" == Brian McCauley <nobull67(a)gmail.com> writes: > > BMcC> I'm fairly sure my first two posts in this thread answered > BMcC> everything the OP asked and more. Can anyone imagine how the > BMcC> OP could justify the assertion "NONE of you actually came up > BMcC> with the answer". Sometimes people get like this because > BMcC> they expect to be spoon-fed the answer, but in this case > BMcC> even that doesn't explain it because I _did_ spoon-feed him > BMcC> the answer: [snip answer] > > I've seen this happen often; someone asks a basic question, and one > person spoon-feeds an answer while others admonish him for not > checking the FAQ; the person focuses on the admonishment and > completely misses the answer. > > Alternately, the OP was a clueless twit, incapable of recognizing an > answer even when spoon-fed to him. Given how he responded, either > theory works. > Charlton and others, I followed-up on this problem by e-mail and your first guess is close to what happened. Cloink had a perl code problem with URI-escaped, UTF-8 encoded Unicode, which included a tie-in with JavaScript. He asked his friend, Ian, about it. Ian knows JavaScript, but doesn't know perl. Ian suggested clpmisc. Brian answered Cloink's question twice. One answer was a reply to Cloink's post; and a second answer (actually posted first), which included a clear three-line solution, was a reply to Michele's post. Brian's best answer was two levels down from Cloink's question. Brian's direct reply to Cloink's question never did get around to the three-line answer. What Cloink and Ian saw was Brian's answer that replied directly to Cloink's first post. It told Cloink that his answer was in the "FAQ," and then said that Cloink should provide a link to any quoted standard, etc. As you guessed, Charlton, Cloink and Ian had no idea which "FAQ" they should check. It might be a newsgroup FAQ, or something related to... well, they were both confused. Cloink felt put-off because he was told to post a link to a standard. However, when he got a reply, which was posted directly to his question, he was referred to a mysterious "FAQ." Brian's reply had no link and no indication of where Cloink should look for for the FAQ. Cloink replied and the discussion went downhill from there. After a few rounds of reply and counter-reply, Ian posted an indignant remark of his own. Cloink had been asked, "Are you really that dense?", etc. Ian felt he was responding in the same tone as the replies that Cloink had received. It's quite possible Cloink will never return to clpmisc; it's almost certain that Ian won't be back... but mostly because Ian doesn't use perl in any case. His remark about perl being "niche" simply confirmed his prejudice against perl based on what happened to Cloink's question. Remarks that Ian's departure will improve the newsgroup have missed the point. -- Mark |