At 9:02 PM -0500 11/1/04, Vic Norton wrote:
When I write another script to print out the bytes under __DATA__, I see
"A5" if I execute the script from Terminal, and I see "E2 80 A2" if I run the script fom BBEdit, either directly or "Run in Terminal." But BBEdit can see "A5". It just can't see it as "DATA". If I write a script to look for "A5" in the file that contains the single option-8 data element and run the script from BBEdit, BBEdit has no trouble spotting the A5 at the end of the file.

When you 'run the script from BBEdit, either directly or "Run in Terminal."', what actually happens is BBEdit saves the file in a temporary file and then executes it.


It would seem that BBEdit is saving the temporary file in UTF8 format rather than the specified format.

Actually, check your BBEdit preferences for Text Files: Opening, and also Saving. There is a configuration in there for Default Text Encoding and Guessing Text Encoding. It seems when BBEdit saves the temporary file, these are used instead of the current file's text encoding.

Enjoy,
   Peter.

--
<http://www.interarchy.com/>  <http://documentation.interarchy.com/>

Reply via email to