Identifying special characters
Identifying special characters
- Subject: Identifying special characters
- From: Carl Anderson <email@hidden>
- Date: Sat, 24 Apr 2004 03:01:06 -0400
I have written an AppleScript that takes a list of files that are of
type txt and tries to write them to a single file of type rtf.
This part of the program that does the actual work is sgown below
repeat
set aLine to ""
if paragraph loop of stone is stoppingPoint then
exit repeat
end if
set aLine to paragraph loop of stone
CkLine(aLine)
set aLine to the result & omega
set fSize to fSize + (count of aLine)
my write_to_file(aLine, theFile, true)
set loop to loop + 1
end repeat
on CkLine(phrase)
set loop to 1
set newPhrase to ""
repeat while loop is not equal to (count of phrase) + 1
set theChar to item loop of phrase
CkChar(theChar)
set newPhrase to newPhrase & item loop of phrase
set loop to loop + 1
end repeat
return newPhrase
end CkLine
on CkChar(fly)
set gadget to "{}\\"
set aFlag to false
set loop to 1
repeat while loop is less than 4
if fly is equal to item loop of gadget then
set aFlag to true
exit repeat
end if
set loop to loop + 1
end repeat
return loop
end CkChar
This worked fine until I attempted to transfer the text of a message
posted to the AppleScript Studio List Fri, 22 Mar 2002 00:40:15 +0100
by Martin Michel with the subject HTML encoding -> To save you some
work...
The problem I have encountered is that this posting contains almost
every if not every special character that exists. When the original
text message (type txt) is displayed using the TextEdit application,
changing the width of the display causes a dramatic change in the
length of the message. Specifically, the message is either displayed
completely or it is truncated after the fourth line of special
characters(", "C ", "C). I have decided that there is some character
present ( possibly the characters identified in the message as uml,
raquo, Ecirc, or Igrave) that is affecting the way TextEdit displays
the message.
Can anyone tell me which character is causing this problem?
Sincerely;
Carl Anderson
_______________________________________________
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.