• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Listserv chars (was Re: Removing items from a list)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Listserv chars (was Re: Removing items from a list)


  • Subject: Re: Listserv chars (was Re: Removing items from a list)
  • From: BJ Terry <email@hidden>
  • Date: Sat, 6 Mar 2004 22:17:39 -0800

On Mar 6, 2004, at 7:25 PM, Walter Ian Kaye wrote:

At 06:26p -0800 03/06/2004, Michael Terry didst inscribe upon an electronic papyrus:

On Mar 6, 2004, at 5:08 PM, Steve Meyer wrote:

Regarding your 'Curious' section below - I'm not sure what point you're making(?)


Heh. Sorry, I wasn't making a point--it was just a test. Should have been more clear about that. I was hoping no one would notice since it was below my signature. Anyway, it was all the characters from the MacRoman character set. I wanted to know what the list server would do to them.

And now that you know, shall we do a more explicit test?
Perhaps in lines of 32 rather than 50, in 8-char groups? ...


There's nothing really special going on here, the listserver simply removes the 8th bit, causing everything to turn into nice, standard, 7-bit ASCII.

!"#$%&'()*+,-./0123456789:;<=>?
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopq
rstuvwxyz{|}~

 !"#
$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTU
VWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

Each line of characters is supposed to be 50 characters long. When the applescript used to produce it is run, you'll see that the oddest lines, which, on the list server, start with "r" and end with "#", corresponds to 50 characters when taken in MacRoman. When the 8th-bit is removed from these characters, though, most become simply invisible control characters. 3 of them add new lines, ASCII characters 10 (LF), 11 (vertical tab), and 13 (CR). When the characters pass the mark of 160 (128 + 32) they again form the visible ascii characters in order. That another return occurs after the # is merely an incident of the script used to generate the above text. Here's a script which demonstrates the list server's behaviour. The top part generates the table seen above, the rest strips 8th bits:

set Table to ""

repeat with i from 0 to 255
set Table to Table & (ASCII character i)
if Table's last paragraph's length = 50 then set Table to Table & return
end repeat

repeat with i from 1 to 256
set q to ((ASCII number (item i of Table)) mod 128)
if (ASCII number (item i of Table)) > 127 then
set Table to (items 1 thru (i - 1) of Table) & (ASCII character ((ASCII number (item i of Table)) mod 128)) & (items from (i + 1) to -1 of Table)
end if
end repeat
set my text item delimiters to ""
set Table to Table as string
return Table

There's a bug in this script when it gets to the end, but it isn't really important to our discussion, so I've not bothered to fix it. Perhaps it would be better if the list-server simply supported UTF-8 or something, then we could use the whole Unicode character set.

BJ Terry
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


References: 
 >Removing items from a list (From: Michelle Steiner <email@hidden>)
 >Re: Removing items from a list (From: Steve Meyer <email@hidden>)
 >Re: Removing items from a list (From: Michael Terry <email@hidden>)
 >Re: Removing items from a list (From: Steve Meyer <email@hidden>)
 >Re: Removing items from a list (From: Michael Terry <email@hidden>)
 >Listserv chars (was Re: Removing items from a list) (From: Walter Ian Kaye <email@hidden>)

  • Prev by Date: Re: Listserv chars (was Re: Removing items from a list)
  • Next by Date: Re: The other Folder Action handlers
  • Previous by thread: Re: Listserv chars (was Re: Removing items from a list)
  • Next by thread: Re: Removing items from a list
  • Index(es):
    • Date
    • Thread