Forum Moderators: travelin cat
She tells me she's saving the files in Word as ASCII text with no carriage returns, as I've asked... But when I receive them from her, I'm getting the file in two parts. The first is a binary file that looks like it's the header of an MS-Word document, about 444 bytes, and the second is the clean ASCII text file I want.
The problem is that the second file is getting renamed... no big thing for one message... lots of wasted time when you're contemplating 50 to 100.
Can anyone suggest how to get just a straightforward txt file, with no Word header, from Word for the Mac?
I can email other Macs with Word text files saved this way with no problem. Possibly this is a Mac - PC thing, Mac files contain extra information to say what they are and what program they were made with (unlike PCs which just rely on the file extension - these are optional on Macs). I'm not sure how you would get around this, but maybe the problem is with the email client rather than Word?
<edit>or what jim_w said..</edit>
You could write her a simple VBA program which just did a select all on the text file, sticks the result into a string, and then saves the string as a sequential access file with a .txt extension. This I think would avoid any additional data going in the file - it will certainlly make a file using a default icon, I don't know enough MacOS to know whether it will actually work I'm afraid.
Not sure how you would name the files, possibly she puts the required name at the top of the file, and then the script parses the string for all data before the first end of line.
If she compresses the text file before sending it, that will probably fix it, as most commercial compression products (e.g., Stuffit) figure out the resource fork stuff for you. Maybe her email client can do that automatically.
Otherwise, she can just paste the ASCII text into the body of an email. Or FTP the file to you, etc.
FTP'ing and emailing doesn't solve his problem with renaming. He is getting the correct file in the correct format, it's a naming thing.
Additional Information for Robert:
The resource fork is so that Macs' can also open the ASCII file. That is why the file name is on the small file. The small file is required so that the Mac knows what application the file belongs to, what pretty little icon goes with it, etc.
I'm curious Robert - you don't have Microsoft Word on your PC?
Yes, I do have MS Word, but in this case I don't want to work with or have to convert doc files. I want MS-DOS ASCII text, txt files.
When I work with writers, I have them send me page drafts within a text template I set up for each project... and I then use NoteTab Pro to manage and analyze the drafts. With NoteTab, I can also easily move text into an HTML framework, which I can display to view phrase distribution with the Google Toolbar, use a density analyzer if I want to, etc etc.
The issue for me is handling and managing a large number of files efficiently. By working this way... completely in ASCII... and using strict naming and draft numbering conventions, I save myself a lot of file handling. Again, it may not seem like a lot per file, but over the course of a project it can be hours saved. This is the first time, since I've been using this system, that I've encountered a writer with a Mac.
Fastest alternative, under the circumstances, is probably just to accept the two files, delete one, and rename the other (which does seem to be ASCII text)... but that will add up to a lot of work.
The resource fork is so that Macs' can also open the ASCII file. That is why the file name is on the small file. The small file is required so that the Mac knows what application the file belongs to, what pretty little icon goes with it, etc.
Thanks. I'm not exactly sure what the resource fork includes. Here's an indication of the header file, converted to ASCII... with a lot of binary characters that have been converted into little boxes or hyphens:
--- -->- --^---x-DTEXTMSWD-ÿÿÿÿ-€-FileName.txt--------2-- Writer's Name----2j2D.--2-STR -¿ãÿÿ-¦ý
I think the file contains more than an icon... It also contains the file name, a program ID, and the computer owner's name. Does the resource fork contain all that, or is some of this an MS-Word artifact?
How does the Mac handle html files? I've worked with Mac-generated web pages, and they don't seem to contain extra binary characters for the icon. Or does the problem only show up in the process of attaching the file to an email?
If she compresses the text file before sending it, that will probably fix it, as most commercial compression products (e.g., Stuffit) figure out the resource fork stuff for you.
Next thing I was going to try is zipping the files, but just for academic interest. I think renaming the file (only the last few characters are changed) is probably going to be faster.
Yea it does. But I don't remember exactly what all it contains, it’s been 15 years since I played Mac. Because the file is only 444 bytes, I doubt that the icon is actually in the file but rather a pointer to a resource of icons, the application name, etc. Really does not matter what is in it from you side of the monitor for the PC can’t do anything with it anyhow. HTML may be an idea to fix the problem though!
>Or does the problem only show up in the process of attaching the file to an email?
As I recall, it happens anytime you write a file that is a non-Mac specific file for sharing. However, HTML should not be that way, but to be honest, I don't know. If you find out please let ME know anyway just for future reference.
Yes, compression might be overkill, but it doesn't take long for mail clients to compress/decompress small files automatically, and it's easy for your user to understand. (If you can get your writer to turn on MacBinary encoding in her email client, that should fix it without compression. Stuffit handles this encoding autamatically.)
BTW, it's strange that a text file would have a resource fork at all. Would you be able to find out what application your writer is creating the file in? A lot of Mac apps have the option to save as "PC text" or similar words.
jim_w
Stuffit bills themselves as the cross-platform compressor. I don't know
exact capabilities, but it did make my life easier when I was going cross platform a lot.
BTW, it's strange that a text file would have a resource fork at all. Would you be able to find out what application your writer is creating the file in? A lot of Mac apps have the option to save as "PC text" or similar words.
timster - Please re-read the first several sentences of the first post on this thread.
Yes, I think it's strange too... I thought a txt file was a txt file, just the way an html file is an html file... but I'm not familiar with the ways of the Mac.
My bet is she is running a really old copy of MacWORD which is why the fork is there.
jim_w - I'd asked her what operating system and version of Word she had, just in case that came up....
Mac OS 9.0.4
Word 98 for the Mac
Are these are "really old" or not?
She has Stuffit Lite, and she's not sure whether she can create a zip file. From what I see online, if she has DropZip she should be able to do it. If not, she's going to move the file to a Dell PC laptop she has, save it as a txt file on that machine, and then send it to me.
It sounds like your author's Mac is the correct vintage to have MacLinkPlus installed. That's another pretty easy way to create PC-friendly text files.
A couple reasons a text file is not just a text file:
1-Text files on Mac, Unix, and Windows all use different line breaks
(Mac and Unix files can end up looking like all one line on Windows machines)
* Mac OS 9 line break: Carriage Return (ASCII: 15)
* Unix line break: Line Feed (ASCII: 12)
* MS Line break: Carriage Return + Line Feed
* Mac OS X line break: Sometimes CR, sometimes LF (It's delightfully schizophrenic)
2-Some Mac applications (like Word) "help" by adding resource forks where they're not wanted.
You can download it at this URL, if it doesn't get editted away:
[stuffit.com...]
Since the writer doesn't have this version of Word, though, what she's doing is copying the file to her Dell PC laptop, as I mentioned, and converting with Word for Windows and then emailing from that machine.
>>This is why we get the big bucks, right?There's a concept. ;-))
I'm saving up for ongoing psychiatric treatment. :( :) :o Thanks all for your preliminary counseling.
Been there, did that! ;-)))
>>Since the writer doesn't have this version of Word, though, what she's doing is copying the file to her Dell PC laptop, as I mentioned, and converting with Word for Windows and then emailing from that machine.<<
What happens if she just saves it on the Mac without going through all the steps? That was the doc's problem, he was saving as MSWORD and then converting the file. Double converting was hosing the thing up.
What happens if she just saves it on the Mac without going through all the steps? That was the doc's problem, he was saving as MSWORD and then converting the file. Double converting was hosing the thing up.
I'm not sure I follow... She writes on the Mac and needs to save the file as a MacWord doc file in order to continue working on it. With back and forths with the client, the writing process can take weeks. Eventually, she needs to send the completed file to me and I want a txt file.
So she opens the file again in Word and saves it as MS-DOS text (*.txt) with no line breaks... and when she sends me this file it has a binary component left over from Word. How is this different from the double-converting? I don't understand what you mean by "without going through all the steps?" What steps can we eliminate?
Duh, don't know why we didn't do this before. Would these links apply?
[support.microsoft.com ]
I did a search on the Microsoft Knowledge Base for
'how to save Mac word to PC word format'
You might want to try the above on google as well.
"how to save Mac word to PC word format"
I also wanted to know why the problem was happening, of course. My assumption is that the problem was due to the version of MacWord that was being used. Thanks...
(Sorry if this question has already been asked and answered, but it is late on Fri night, after a long week.)
I think later versions of PCWord knows about Mac resource forks and ignores them. Ergo if she can just write a file to disk, you won't have to rename them at all because you could then load the same file instead of a ASCII text file with the wrong name but a resource fork with the correct name.
Sorry to come into this conversation late, but what email client is she using? If it is Outlook Express, she should be encoding the attachment for Windows, and it won't try to send the resource fork.
Checking the header of one of the messages where I got the resource fork and the text file as two txt files, it reads:
User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.02.2022
Thanks. I will let her know and see if this helps...
An interesting new development, though... ;) In addition to the writer, there's an account person on this, also with a Mac, and I send her copies of my edits of the txt files that the writer and I are exchanging.
If the account person opens my files with a program called Simple Text, she sees a vertical rectangle at the beginning of each line following a carriage break (she sent me a screen shot).
She can read my txt files fine in MacWord, so we can continue working. I'm assuming that Simple Text is something like the Mac equivalent of Notepad, and that it might just be displaying the carriage returns... but why at the beginning of the lines rather than at the ends, and how can she eliminate these?
Is there a setting in the program to turn these off? Or, are these some sort of cross-platform artifacts? When I see rectangles displayed in a Windows program, it usually means that there's a character there that the program isn't equipped to interpet.
Ergo if she can just write a file to disk, you won't have to rename them at all...
jim_w - I'm sorry, but for the life of me, I can't figure out what point you're trying to make. Are you suggesting that she get a new version of Word for converting these files, or that we follow a different procedure? She's already writing the file to disk, as I understand what that means, so I'm not sure what you're advising.