Re: linebreak in a shell script; was Re: What's wrong with this call to zip?
Re: linebreak in a shell script; was Re: What's wrong with this call to zip?
- Subject: Re: linebreak in a shell script; was Re: What's wrong with this call to zip?
- From: "Mark J. Reed" <email@hidden>
- Date: Thu, 28 Feb 2008 19:07:37 -0500
Ok, so there's some magical weirdness with crlf in as 2.0. Don't
conflate it with the Unicode stuff, though. It may have gone in at
the same time but this behavior is definitely not a Unicode thing.
On 2/28/08, Shane Stanley <email@hidden> wrote:
> On 29/2/08 8:59 AM, "Mark J. Reed" <email@hidden> wrote:
>
> > The ASCII commands don't necessarily use MacRoman, right? It depends
> > on your locale settings.
>
> I presume so, but I haven't tried it myself.
> >
> >> Also, a linefeed following a carriage return is a single Unicode
> character
> >> (with two code points)
> >
> > I don't get this, and I thought I was pretty darn familiar with
> > Unicode. What's the story?
>
> I don't know anything other than how it seems to work. For example, in
> Leopard:
>
> set x to "blah" & return & linefeed & "blah"
> count of characters of x --> 9
> character 5 of x --> in Script Debugger, "\r\n"
> id of character 5 of x --> {13, 10}
> set oldDelims to AppleScript's text item delimiters
> set AppleScript's text item delimiters to {linefeed}
> count of text items of x --> 1
> set AppleScript's text item delimiters to oldDelims
>
> (The result is the same if you use ASCII character 10 instead of the
> built-in linefeed.)
> --
> Shane Stanley <email@hidden>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden