Pages: How it fares with files without an extension

Posted by Pierre Igot in: Microsoft, Pages
March 2nd, 2005 • 6:58 am

Pages is very much a Mac OS X-only application in that it uses a file extension to identify the files that it creates as Pages documents. The extension is “.pages“. If you remove that extension from the name of a file created by Pages, Pages becomes unable to open the file.

By contrast, a file created by Microsoft Word (including Word 2004) is still recognized as a Word file even if you remove its “.doc” extension. This is because Word, as a “legacy” application from the pre-Mac OS X days, still uses the invisible file type and file creator codes that are stored with the files it creates.

Apple is well aware that Microsoft still uses the file creator/type codes as the primary way to identify its files as Microsoft Word files, and that the “.doc” extension that Word can add to the name is an optional feature that is redundant on the Mac. (If, on the other hand, you want to share Word files with PC users, the “.doc” extension is very much indispensable, because the file creator/type information is stripped from the file when you share it with them.)

So Pages is still able to import Word files even if they don’t have the “.doc” suffix. In other words, Apple did bother to include in Pages some code that analyses the file type/creator codes of files that users are trying to import in Pages.

It’s good to know. But it still disappointing that Pages doesn’t use file creator/type codes itself, in addition to the “.pages” extension. I know that Apple’s strategy since the introduction of Mac OS X has been to try and enforce the use of file extensions throughout the system — but clearly that strategy is a failure, because many Mac users are still using pre-Mac OS X systems and sharing their files with Mac OS X users and because some prominent third-party applications such as Microsoft Word and Microsoft Excel still use file creator/type codes as the primary tool to identify the files that they create.

In addition, Pages’ support for file type/creator codes is incomplete. For example, if you receive a WordPerfect file from a PC user (with the extension “.wpd“) and you use Dataviz’ MacLinkPlus Deluxe to translate it into a more Mac-friendly RTF file, Pages will not be able to import the resulting file. It will complain that it’s an “unknown file type“.

The problem is in fact that MacLinkPlus Deluxe itself uses the wrong file type/creator codes. MacLinkPlus Deluxe is definitely not Mac OS X-friendly in that it still doesn’t have an option to add file extensions when converting files. (It’s not the only problem with MacLinkPlus Deluxe. See this item for more on the application’s lack of support for key Mac OS X features.) Instead, MacLinkPlus Deluxe uses file creator/type codes. For example, when translating a WordPerfect file into a Microsoft Word file, MacLinkPlus Deluxe does not add the “.doc” extension. Instead, it adds the “MSWD” file creator code and the “W8BN” file type code, which identify the file as a Microsoft Word file.

But then when you translate a WordPerfect file into an RTF file with MacLinkPlus Deluxe, the resulting file has the “MSWD” file creator code and… “TEXT” as the file type code. An RTF file created with Microsoft Word, on the other hand, has “MSWD” as the creator code and “RTF ” as the file type code.

So clearly MacLinkPlus Deluxe is wrong here. But the bottom-line is that Microsoft Word is still able to open RTF files created with MacLinkPlus Deluxe without any problems. Pages, on the other hand, is not. The only way to get Pages to open an RTF file created by MacLinkPlus Deluxe is to add the “.rtf” file extension to the file name manually yourself.

So the problem is clearly with Dataviz here. (What else is new?) Still, I cannot help but think that Pages could be more Word-friendly and recognize the file type of RTF files created by MacLinkPlus Deluxe, just like Word itself recognizes them. It is, after all, not the end user’s fault if MacLinkPlus Deluxe is a lousy piece of software. It’s still the only way to read WordPerfect files on the Mac.

More crucially though, it should also be noted that, when you export a Pages document in Word format from within Pages, Pages adds the “.doc” extension to the file name, but does not add the file creator and file type codes to the file. So in effect Word files created with Pages are not true Mac Word files, and if you share them with Mac users using an older version of the Mac OS, you might encounter problems — because without the file creator and file type codes, the classic Mac OS will not know that “.doc” files are in fact Microsoft Word files.


15 Responses to “Pages: How it fares with files without an extension”

  1. Warren Beck says:

    Ironically, when one exports a Pages document as a pdf, the file appears in the finder without the pdf extension. This occurs whether or not one tries to save as “filename.pdf” in the Save As… dialog/sheet?the file appears in the finder as “filename” but with the pdf icon. So the type/creator information is saved with the pdf-format file, but _without_ the extension.

    I’ve reported this to Apple as a bug, but how in the world could this have passed the “quality assurance” and testing process?

    Pierre, the inconsistency that you have noted in today’s apps has to involve a lack of coordination among the many developers that have a hand in the programming process. In the good old days, a single developer conceived, developed, and shipped the app.

  2. Pierre Igot says:

    Warren: I am not able to reproduce this problem here. Whether I used the Export command or the Save as PDF button in the Print dialog, I get a file with a “.pdf” extension — and definitely no type/creator information.

    Are you sure your extensions aren’t just hidden? The way that Mac OS X shows/hides extensions is somewhat unpredictable…

  3. Warren Beck says:

    Interesting; on my system, the hide extensions checkbox isn’t checked. I’ll follow up on this….

  4. Warren Beck says:

    Pierre: it appears that you were right, that I must have had the hide extensions checkbox checked before; at this point, I can save filename.pdf without problems if that checkbox is _not_ checked.

    I’ve noticed that the hide extensions checkbox _unchecks_ itself if you type .pdf in the filename field; this behavior is standard in Mac OS X. I might have been confused as to the actual state of the checkbox. However, I _always_ save with extensions, just to avoid problems, and several times I saved a pdf without the extension no matter what I tried. Strange.

    But thanks again for your input on this, it turns out to be a non-problem. :-)

  5. Warren Beck says:

    Upon additional experimentation, I find that Pages does have a bug in the extensions handling when exporting pdfs _if_ the “hide extensions” checkbox _is_ checked. If one types “filename.pdf” for the filename, the “hide extensions” checkbox automatically unchecks itself. This is the expected behavior. But the pdf file gets saved as “filename” in the finder, so the entered “.pdf” gets stripped. This is not expected.

    As you note above, things work properly if the “hide extensions box” is unchecked.

  6. Pierre Igot says:

    Warren: I am afraid I can’t reproduce this either.

  7. Warren Beck says:

    Pierre: I’m not sure what is going on with this. This “hide extensions” thing is behaving strangely on my system. Sorry for the trouble ? it is not clear that Pages is at fault here, but the other apps on my system do not exhibit the problem(s) I reported. I’ll let you know if I figure it out.

  8. Pierre Igot says:

    Whether it’s a single file or a bundle is not really relevant to me :). To the end user a file is a file, and the fact that some files behave in some way and some other files in another way is an inconsistency, pure and simple — regardless of what the underlying architectural reasons are.

  9. Olivier says:

    A Pages document is a bundle, i.e. a special folder that’s treated like a single file, like most Mac OS X applications are. Therefore it has no creator and type (or it has the creator/type of a folder, which were something like FNDR/fold).

  10. Olivier says:

    You’re right. I had forgotten that a bundle contains a file called PkgInfo that contains the creator and type of the file it would like to be taken for. For example APPLsfri for Safari.

    I don’t have iWork installed here yet but Keynote 1.0 bundles have ???????? in PkgInfo.

  11. Pierre Igot says:

    It’s “????????” for Pages documents as well.

  12. Pierre Igot says:

    Yeah, I am afraid this insistence on choosing the file extension for us is ultimately insulting. My feeling is that if the user chooses to make the extension visible, then he knows what he’s doing and Apple should not get in the way.

    Unfortunately, I see little hope for improvement on this. (BTW, do TidBITs really use Unicode chars in their mailings? :-))

  13. Warren Beck says:

    I should like to resolve the confusion about my several posts, above, where I argued that Pages is doing something strange and unusual with the extensions when exporting pdfs. I’ve traced this down to the “Show all file extensions” in the “Advanced” tab of the Preferences for the Finder. As Pierre argued in response to one of my posts, apparently I had the “Show all file extensions” preference unchecked. So, even if I manually entered the .pdf (or whatever) extension in the filename field in file saving dialog, the Finder suppressed the extension.

    It seems to me that if I actually type in the extension, then the Finder should jolly well show the extension. No matter what the state of the checkbox buried in the preferences.

    Again, sorry for the (repeated) confusion. I was, quite obviously, fairly well confused. :-)

  14. Clint says:

    Pierre:

    Apple has inconsistent ? or at least irritating ? filename extension behaviors in its other applications. I am speaking here specifically of Mail.app. Mail.app will not allow me to save using ?Plain Text? the text of any e-mail with any extension other than ?.txt,? even if the user (i.e., *me*) wants another extension.

    I receive the venerable TidBITs weekly mailing in its ?setext? formatting (a simple markup system). To view setext using one of the few setext applications, one must save the plain text of the e-mail using the filename extension to ?.etx.? Mail.app will not accept any change to the filename extension, causing me to have to navigate to the file in the Finder and change the filename extension there.

    (It is possible to save as ?Raw Message Source? from Mail.app but that mangles Unicode characters.)

    Is Apple afraid I might hurt myself by typing something other than ?.txt? in the filename?

    Best wishes,
    Clint

  15. Pierre Igot says:

    No need to apologize. Your confusion is perfectly understandable. The situation is confusing. And I am afraid it will remain so as long as Apple (and the computing world at large) insists as file extensions as the “proper” way to identify file type.

    On the other hand, it means that tech support people like me won’t be out of a job any time soon :).

Leave a Reply

Comments are closed.