• 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: (ascii 10 ascii 13) --> (ascii 13) in Tex-Edit?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (ascii 10 ascii 13) --> (ascii 13) in Tex-Edit?


  • Subject: Re: (ascii 10 ascii 13) --> (ascii 13) in Tex-Edit?
  • From: Michelle Steiner <email@hidden>
  • Date: Sun, 18 Mar 2001 21:54:38 -0800

On 3/18/01 8:02 PM, Bill Christens-Barry <email@hidden> wrote:

>A number of text files I download contain the character pair (ascii
>10 ascii 13) as a line terminator, and I can't seem to find a way to
>use Tex_Edit's dictionary to replace these with (ascii 13).

How about using Applescript's text handling features?

set fileToBeProcessed to choose file of type {"TEXT"}
set fileRef to open for access fileToBeProcessed with write permission
set textToBechanged to read file fileRef
set charpair to (ASCII character 10) & return
set {tid, text item delimiters} to {text text item delimiters, charpair}
set textItems to text items of textToBechanged
set text item delimiters to return
set textToBechanged to textItems as text
set text item delimiters to tid
set eof fileRef to 0
write textToBechanged to fileRef starting at 0 as text
close fileRef
set text item delimiters to tid

--Michelle

----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------


  • Prev by Date: Re: (ascii 10 ascii 13) --> (ascii 13) in Tex-Edit?
  • Next by Date: DD progress bar
  • Previous by thread: Re: (ascii 10 ascii 13) --> (ascii 13) in Tex-Edit?
  • Next by thread: DD progress bar
  • Index(es):
    • Date
    • Thread