PDA

View Full Version : Editor saving oddity



Ben Spackman
01-30-2009, 03:57 PM
If editing a txt file in the editor, one simply clicks "save", then odd formatting is introduced. By clicking the "save" option-part of the button, then "save as", said formatting doesn't appear. It's as if the editor thinks and saves as though it's an rtf file, but keeps the file type as txt.

If it crashes (or does the "you're closing BW but haven't saved this file yet") while the editor is open to a txt file, the same odd formatting appears, as below.


{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Arial;}}
{\colortbl ;\red0\green0\blue0;}
{\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\cf1\lang1033\fs2 0

and every line gets a "\par" tacked on at the end.

This is problematic if one is writing or editing a txt file that is being integrated into BW, since the VDC doesn't recognize any of it.

Michael Hanel
01-30-2009, 04:01 PM
Could it be the case that the editor is only capable of saving something in RTF format? I guess I've never experienced this because I've never used a simple text file in the Editor, it was always something I continued to use in the Editor.

Ben Spackman
01-30-2009, 04:07 PM
The Editor help file doesn't say anything about file types.

I just ran a test, by creating a file in the Editor with some random text, saving it as RTF, and then renaming the file as a txt and opening it with Wordpad.

The formatting that appears is RTF formatting, which becomes visible when you open it as a txt.

So although the file type is txt, the editor appears to always add RTF formatting by default, regardless of filetype. The only way around is a few (what should be) redundant clicks of "save as" then "txt".

Michael Hanel
01-30-2009, 04:12 PM
The Editor help file doesn't say anything about file types.

I just ran a test, by creating a file in the Editor with some random text, saving it as RTF, and then renaming the file as a txt and opening it with Wordpad.

The formatting that appears is RTF formatting, which becomes visible when you open it as a txt.

So although the file type is txt, the editor appears to always add RTF formatting by default, regardless of filetype. The only way around is a few (what should be) redundant clicks of "save as" then "txt".

Hmm. Ok, so if you open a .txt file and hit save, it automatically converts it to .rtf style, but if you open a .txt file and explicitly do save as .txt then it will work correctly. I was thinking you meant it could only do .rtf. Then maybe there's a possibility of it getting fixed if the Editor can be trained to recognize what kind of file is open.