pasting from browser text

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

pasting from browser text

Stephen Barncard-4
HI gang,

I'm having trouble in pasting copied text from a browser. Returns are
coming back as "?" (ascii 3F  dec 63 ) and there are no other characters
before or after.

my cut source is the first two paragraphs of

http://jazzcubed.com

How can I recover the returns and return & returns (paragraphs) from this
text?
<scratches head>

thanks

sqb


--



Stephen Barncard
San Francisco Ca. USA

more about sqb  <http://www.google.com/profiles/sbarncar>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: pasting from browser text

ScottR
Do you have to use the copied text or can you use the source HTML text?

set text of fld 1 to url "http://jazzcubed.com/"


Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 9/23/13 3:27 PM, "stephen barncard" <[hidden email]>
wrote:

>HI gang,
>
>I'm having trouble in pasting copied text from a browser. Returns are
>coming back as "?" (ascii 3F  dec 63 ) and there are no other characters
>before or after.
>
>my cut source is the first two paragraphs of
>
>http://jazzcubed.com
>
>How can I recover the returns and return & returns (paragraphs) from this
>text?
><scratches head>
>
>thanks
>
>sqb
>
>
>--
>
>
>
>Stephen Barncard
>San Francisco Ca. USA
>
>more about sqb  <http://www.google.com/profiles/sbarncar>
>_______________________________________________
>use-livecode mailing list
>[hidden email]
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode
>



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: pasting from browser text

Stephen Barncard-4
Thanks Scott,
I know how to screen scrape from the html source...

I want to use the contents of the clipboard to just get the part I need.
And this return business is getting in the way.... I get a block of text
with question marks instead of returns.   I'm not sure how actual question
marks show up yet.

There are no LFs or any other control characters in the copied text other
than the question marks.  I've tried using clipboardData[rtf]
and clipboardData unicode] and setting the field to the appropriate mode.
 No difference.

I have a utility I created to examine the various keys in the
clipboardData, and it gives me a hex dump of the contents of any of the
keys....

By the way, the text copied from the browser pastes perfectly into
Tex-Edit, an application that I've used for over 20 years and has a nice
way to display the ascii value of any character in its text.

Could this be a problem with the way that Livecode copies text into
clipboardData?

this should just work.


On Mon, Sep 23, 2013 at 3:40 PM, Scott Rossi <[hidden email]> wrote:

> Do you have to use the copied text or can you use the source HTML text?
>
> set text of fld 1 to url "http://jazzcubed.com/"
>




--



Stephen Barncard
San Francisco Ca. USA

more about sqb  <http://www.google.com/profiles/sbarncar>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: pasting from browser text

Stephen Barncard-4
Directly pasting into an LC field produces the exact same result. Wrong.


On Mon, Sep 23, 2013 at 4:18 PM, stephen barncard <
[hidden email]> wrote:

> Thanks Scott,
> I know how to screen scrape from the html source...
>
> I want to use the contents of the clipboard to just get the part I need.
> And this return business is getting in the way.... I get a block of text
> with question marks instead of returns.   I'm not sure how actual question
> marks show up yet.
>
> There are no LFs or any other control characters in the copied text other
> than the question marks.  I've tried using clipboardData[rtf]
> and clipboardData unicode] and setting the field to the appropriate mode.
>  No difference.
>
> I have a utility I created to examine the various keys in the
> clipboardData, and it gives me a hex dump of the contents of any of the
> keys....
>
> By the way, the text copied from the browser pastes perfectly into
> Tex-Edit, an application that I've used for over 20 years and has a nice
> way to display the ascii value of any character in its text.
>
> Could this be a problem with the way that Livecode copies text into
> clipboardData?
>
> this should just work.
>
>
> On Mon, Sep 23, 2013 at 3:40 PM, Scott Rossi <[hidden email]>wrote:
>
>> Do you have to use the copied text or can you use the source HTML text?
>>
>> set text of fld 1 to url "http://jazzcubed.com/"
>>
>
>
>
>
> --
>
>
>
> Stephen Barncard
> San Francisco Ca. USA
>
> more about sqb  <http://www.google.com/profiles/sbarncar>
>



--



Stephen Barncard
San Francisco Ca. USA

more about sqb  <http://www.google.com/profiles/sbarncar>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: pasting from browser text

Stephen Barncard-4
Tested with LC 6.1.1 and 5.5.5  - same thing

by the way, pasting back from the pasted text of Tex-Edit or TextMate  back
to LC looks fine as well.

Should this be reported as a bug? I'm surprised this hasn't happened to
anyone else...


On Mon, Sep 23, 2013 at 4:21 PM, stephen barncard <
[hidden email]> wrote:

> Directly pasting into an LC field produces the exact same result. Wrong.
>
>
> On Mon, Sep 23, 2013 at 4:18 PM, stephen barncard <
> [hidden email]> wrote:
>
>> Thanks Scott,
>> I know how to screen scrape from the html source...
>>
>> I want to use the contents of the clipboard to just get the part I need.
>> And this return business is getting in the way.... I get a block of text
>> with question marks instead of returns.   I'm not sure how actual question
>> marks show up yet.
>>
>> There are no LFs or any other control characters in the copied text other
>> than the question marks.  I've tried using clipboardData[rtf]
>> and clipboardData unicode] and setting the field to the appropriate mode.
>>  No difference.
>>
>> I have a utility I created to examine the various keys in the
>> clipboardData, and it gives me a hex dump of the contents of any of the
>> keys....
>>
>> By the way, the text copied from the browser pastes perfectly into
>> Tex-Edit, an application that I've used for over 20 years and has a nice
>> way to display the ascii value of any character in its text.
>>
>> Could this be a problem with the way that Livecode copies text into
>> clipboardData?
>>
>> this should just work.
>>
>>
>> On Mon, Sep 23, 2013 at 3:40 PM, Scott Rossi <[hidden email]>wrote:
>>
>>> Do you have to use the copied text or can you use the source HTML text?
>>>
>>> set text of fld 1 to url "http://jazzcubed.com/"
>>>
>>
>>
>>
>>
>> --
>>
>>
>>
>> Stephen Barncard
>> San Francisco Ca. USA
>>
>> more about sqb  <http://www.google.com/profiles/sbarncar>
>>
>
>
>
> --
>
>
>
> Stephen Barncard
> San Francisco Ca. USA
>
> more about sqb  <http://www.google.com/profiles/sbarncar>
>



--



Stephen Barncard
San Francisco Ca. USA

more about sqb  <http://www.google.com/profiles/sbarncar>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: pasting from browser text

Stephen Barncard-4
On Mon, Sep 23, 2013 at 4:25 PM, stephen barncard <
[hidden email]> wrote:

> Should this be reported as a bug? I'm surprised this hasn't happened to
> anyone else...


Here's the next wrinkle :  The problem manifests with Safari, but not
Google Chrome or Firefox.    grrrrr


--



Stephen Barncard
San Francisco Ca. USA

more about sqb  <http://www.google.com/profiles/sbarncar>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: pasting from browser text

Jerry Jensen
Geez, I'm about to stop using Safari. Running Firefox only when something doesn't work in Safari is getting old. I think I'll just recommend that people I support start using Firefox by default.
.Jerry

On Sep 23, 2013, at 5:44 PM, stephen barncard <[hidden email]> wrote:

> On Mon, Sep 23, 2013 at 4:25 PM, stephen barncard <
> [hidden email]> wrote:
>
>> Should this be reported as a bug? I'm surprised this hasn't happened to
>> anyone else...
>
>
> Here's the next wrinkle :  The problem manifests with Safari, but not
> Google Chrome or Firefox.    grrrrr
>
>
> --
>
>
>
> Stephen Barncard
> San Francisco Ca. USA
>
> more about sqb  <http://www.google.com/profiles/sbarncar>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: pasting from browser text

mwieder
Jerry-

Monday, September 23, 2013, 5:48:38 PM, you wrote:

> Geez, I'm about to stop using Safari. Running Firefox only when
> something doesn't work in Safari is getting old. I think I'll just
> recommend that people I support start using Firefox by default.

...and Firefox is such a memory hog that I'm starting to use Chrome
more. I prefer Mozilla to Google, but they've taken the bloated path.

--
-Mark Wieder
 [hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
--
 Mark Wieder
 ahsoftware@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: pasting from browser text

Stephen Barncard-4
Please don't let particular my problem change your attitude about Safari. I
am trying to see if it's my web coding. Currently the text on that page is
placed there with PUT statements and livecode server. I was using <br> for
returns and <br><br> for a new paragraph, which is bad form, but easier to
code with the method I was using. And if I write the html normally (with
<br> for returns) in the page without using LC server puts, it can be
copied properly.

Even if the HTML is malformed, I should be able to copy what I see WYSIWYG
text wise...

 I still like Safari and Webkit, I really don't like Chrome or Firefox, and
most Apple users will continue to use it no matter what. I'm still tracing
it down some more before making a bug report.

I'm making a test page.


On Mon, Sep 23, 2013 at 6:03 PM, Mark Wieder <[hidden email]> wrote:

> Jerry-
>
> Monday, September 23, 2013, 5:48:38 PM, you wrote:
>
> > Geez, I'm about to stop using Safari. Running Firefox only when
> > something doesn't work in Safari is getting old. I think I'll just
> > recommend that people I support start using Firefox by default.
>
> ...and Firefox is such a memory hog that I'm starting to use Chrome
> more. I prefer Mozilla to Google, but they've taken the bloated path.
>
> --
> -Mark Wieder
>  [hidden email]
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



--



Stephen Barncard
San Francisco Ca. USA

more about sqb  <http://www.google.com/profiles/sbarncar>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: pasting from browser text

Jerry Jensen
Straw. Camel's back.

On Sep 23, 2013, at 7:56 PM, stephen barncard <[hidden email]> wrote:

> Please don't let particular my problem change your attitude about Safari. I
> am trying to see if it's my web coding. Currently the text on that page is
> placed there with PUT statements and livecode server. I was using <br> for
> returns and <br><br> for a new paragraph, which is bad form, but easier to
> code with the method I was using. And if I write the html normally (with
> <br> for returns) in the page without using LC server puts, it can be
> copied properly.
>
> Even if the HTML is malformed, I should be able to copy what I see WYSIWYG
> text wise...
>
> I still like Safari and Webkit, I really don't like Chrome or Firefox, and
> most Apple users will continue to use it no matter what. I'm still tracing
> it down some more before making a bug report.
>
> I'm making a test page.
>
>
> On Mon, Sep 23, 2013 at 6:03 PM, Mark Wieder <[hidden email]> wrote:
>
>> Jerry-
>>
>> Monday, September 23, 2013, 5:48:38 PM, you wrote:
>>
>>> Geez, I'm about to stop using Safari. Running Firefox only when
>>> something doesn't work in Safari is getting old. I think I'll just
>>> recommend that people I support start using Firefox by default.
>>
>> ...and Firefox is such a memory hog that I'm starting to use Chrome
>> more. I prefer Mozilla to Google, but they've taken the bloated path.
>>
>> --
>> -Mark Wieder
>> [hidden email]
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
>
> --
>
>
>
> Stephen Barncard
> San Francisco Ca. USA
>
> more about sqb  <http://www.google.com/profiles/sbarncar>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: pasting from browser text

Stephen Barncard-4
yes, it's very possible I've made a total ass out of myself.


On Mon, Sep 23, 2013 at 8:21 PM, Jerry Jensen <[hidden email]> wrote:

> Straw. Camel's back.
>
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: pasting from browser text

mwieder
In reply to this post by Stephen Barncard-4
Stephen-

Monday, September 23, 2013, 7:56:58 PM, you wrote:

>  I still like Safari and Webkit

All modern browsers are webkit-based.

--
-Mark Wieder
 [hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
--
 Mark Wieder
 ahsoftware@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: pasting from browser text

BNig
In reply to this post by Stephen Barncard-4
Stephen,

if I copy from your page the first two paragraphs from Safari into a LiveCode field resulting in the behavior you describe and then look at the htmlText of that field it says

groove.

The 2013

apparently Safari serves the line breaks as 
 which means linebrake and Livecode's HTML-parser does not know what to do whith them.

So it is probably a Livecode problem.

Kind regards
Bernd
Reply | Threaded
Open this post in threaded view
|

Re: pasting from browser text

BNig
Just noticed that the post did not show the most important information:

the htmlText of the first two paragraphs of your website show at the paragraph end

groove.ampersand hashmark 8232 semicolon ampersand hashmark 8232 semicolon The 2013

apparently 8232 is not recognized by Livecode's HTML-parser as linebreak.

So it is probably a Livecode problem

Kind regards
Bernd
Reply | Threaded
Open this post in threaded view
|

Re: pasting from browser text

Stephen Barncard-4
On Tue, Sep 24, 2013 at 12:32 AM, BNig <[hidden email]> wrote:

> apparently 8232 is not recognized by Livecode's HTML-parser as linebreak.
>
> So it is probably a Livecode problem
>
> Kind regards
> Bernd
>

Thanks so much for finding this. I was starting to feel foolish. Now I have
something to report to QC.

thanks Bernd...

sqb


--



Stephen Barncard
San Francisco Ca. USA

more about sqb  <http://www.google.com/profiles/sbarncar>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode