• 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
ASCII vs. MacRoman (was Re: Standard Additions 'read' command - basic questions)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ASCII vs. MacRoman (was Re: Standard Additions 'read' command - basic questions)


  • Subject: ASCII vs. MacRoman (was Re: Standard Additions 'read' command - basic questions)
  • From: Chris Page <email@hidden>
  • Date: Mon, 19 Jan 2004 14:21:04 -0800

On Jan 19, 2004, at 12:36, Christopher Nebel wrote:

The problem is that your delimiter string is being fetched as Unicode, but then it looks for the Unicode code point in the data, which is *not* 254 (or 255, or whatever), since your primary encoding is probably MacRoman, which doesn't agree with Unicode at all above 127. (127 and below -- that is, ASCII -- is fine.)

I realize this is a separate topic, but: In fact, it's misleading for "ASCII character" to work with values above 127, which are not ASCII. It's too bad people have played fast-and-loose with the term ASCII lo these many decades, including nearly every mainstream programming language. Really, "ASCII character" should produce an error if the numeric value is not valid ASCII. Either it should have been named "MacRoman character" or some other mechanism should have been created for handling other character encodings.

In fact, it's not too late. It might be useful to rename it to something like "MacRoman character" and provide "ASCII character" as a synonym (so "ASCII character" could still be used, but it would decompile to "MacRoman character").

I'll file a bug, but in the meantime, try using FS (field separator, ASCII character 28) and RS (record separator, ASCII character 30) instead -- that's what they were designed for.

I've always wondered where this is defined. Every piece of documentation I've seen on ASCII fails to fully describe the control characters and their meanings (though it's easy to guess what FS and RS are for). Have you ever seen a detailed definition for FS and RS anywhere? I'd really like to see better documentation on ASCII.

--
Chris Page - Software Wrangler - palmOne, Inc.

SmartFriends(TM) U: Languages and Libraries, Sept. 26-28
Keynote: STL Creator, Alexander Stepanov
<http://SmartFriends.com/U>
_______________________________________________
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.

  • Follow-Ups:
    • Re: ASCII vs. MacRoman (was Re: Standard Additions 'read' command - basic questions)
      • From: Axel Luttgens <email@hidden>
    • Re: ASCII vs. MacRoman
      • From: Doug McNutt <email@hidden>
    • Re: ASCII vs. MacRoman (was Re: Standard Additions 'read' command - basic questions)
      • From: Walter Ian Kaye <email@hidden>
    • Re: ASCII vs. MacRoman (was Re: Standard Additions 'read' command - basic questions)
      • From: "John W. Baxter" <email@hidden>
References: 
 >Standard Additions 'read' command - basic questions (From: Chap Harrison <email@hidden>)
 >Re: Standard Additions 'read' command - basic questions (From: Emmanuel <email@hidden>)
 >Re: Standard Additions 'read' command - basic questions (From: Emmanuel <email@hidden>)
 >Re: Standard Additions 'read' command - basic questions (From: Christopher Nebel <email@hidden>)

  • Prev by Date: [ANN] Free AppleScript Course
  • Next by Date: Re: Running ssh from AppleScript...
  • Previous by thread: Re: Standard Additions 'read' command - basic questions
  • Next by thread: Re: ASCII vs. MacRoman (was Re: Standard Additions 'read' command - basic questions)
  • Index(es):
    • Date
    • Thread