Apple File Exchange Q&As

Technote PT 515October 1990

Revised by: Developer Support Center September 1993
Written by: Developer Support Center October 1990

This Technical Note contains a collection of archived Q&As relating to a specific topic--questions sent the Developer Support Center (DSC) along with answers from the DSC engineers. Current Q&A's can be found on the Macintosh Technical Q&A's web site.

Apple File Exchange (AFE) translator documentation

Date Written: 4/18/91

Last reviewed: 8/30/91

Information on how to write an Apple File Exchange (AFE) translator is available through APDA as "Apple File Exchange Technical Reference Package v.1.1." The package includes an 800K disk and 184 pages of documentation.

Apple File Exchange (AFE) Apple II 'pdos' creator type

Date Written: 6/18/90

Last reviewed: 8/30/91

Could you give me a description (or where to find it) of the 'pdos' resource created by Apple File Exchange when bringing over files from an Apple ][?


Apple File Exchange (AFE) makes a 'pdos' creator type for Apple II files it creates on the Macintosh. The format of the file depends upon the type of file it was on the Apple II, but the creator is always 'pdos', with the file type differentiating between different Apple II file types.

The way files are supposed to be translated is found on page 141 of "The AppleShare Programmer's Guide for the Apple II," available through APDA. In the case of AppleShare, it must perform the translations on the fly, and AFE follows the same basic rules. In case you don't currently have this manual, I'll include the relevant parts of it below for your reference.

Equivalence of Macintosh and GS/OS file types

Apple II files are distinguished by a Macintosh creator of 'pdos'. The Apple II filetype SYS (=$FF) has a Macintosh filetype of 'PSYS'. The Apple II filetype S16 (=$B3) has a Macintosh filetype of 'PS16'. The Apple II unknown filetype (=$00) has Macintosh filetype 'BINA'. Apple II text files (TXT = $04) with auxtype of $0000 (i.e., normal ASCII text, no records) has Macintosh filetype 'TEXT'. These special cases allow Macintosh to display unique icons for these filetypes.

Macintosh files with creator 'pdos' and a filetype of the form 'XY ' (two hex digits followed by two spaces) will get Apple II filetype $XY and auxtype $0000. Macintosh files with creator 'pdos' and a filetype of the form $70uvwxyz ($70 is the lower-case "p") have ProDOS filetype $uv and auxtype $wxyz (note the order of the bytes: on the Macintosh, they are stored high-low instead of low-high).

APW source files (ProDOS filetype $B0) are given Macintosh filetype 'TEXT' so that they can be edited more easily.

The conversion rules are summarized in the following tables. If more than one rule applies, the one closest to the top of the table is used.

ProDOS -> Macintosh conversion

ProDOS             Macintosh
Filetype    Auxtype    Creator    Filetype
$00          $0000     'pdos'     'BINA'
$B0 (SRC)    (any)     'pdos'     'TEXT'
$04 (TXT)    $0000     'pdos'     'TEXT'
$FF (SYS)    (any)     'pdos'     'PSYS'
$B3 (S16)    (any)     'pdos'     'PS16'
$uv          $wxyz     'pdos'     'p' $uv $wx $yz

Macintosh -> ProDOS conversion

Macintosh              ProDOS
Creator     Filetype   Filetype         Auxtype
(any)        'BINA'    $00              $0000
(any)        'TEXT'    $04 (TXT)        $0000
'pdos'       'PSYS'    $FF (SYS)        $0000
'pdos'       'PS16'    $B3 (S16)        $0000
'pdos'       'XY[[Delta]][[Delta]]'*   $XY              $0000
'pdos'       'p'       $uv $wx $yz $uv  $wxyz
(any)        (any)     $00              $0000

* Where X, Y are hex digits (i.e., "0"-"9" or "A" - "F"), and [[Delta]] is a space.

Translating Macintosh extended ASCII set to 7-bit ASCII

Date Written: 1/28/91

Last reviewed: 2/15/91

What is the best way to convert text created using the standard Macintosh character set to 7-bit ASCII for display on a terminal? Is there a standard call or table that will give me what I want?


The Macintosh uses an extended ASCII character set. The first 128 (0-127) characters are standard ASCII, but the next 128 (128-255) are unique to the Macintosh.

There are problems when converting from a large set to a smaller set. I am including two samples (there is no ONE correct way) of how to do the conversion from Macintosh to ASCII.

One way is to simplify the character to the closest ASCII character. This unfortunately loses information that distinguished the original character, but still maintains the same data size (it actually shrinks from 8 bits to 7 bits). Another way is to approximate the original character with multiple ASCII characters. This retains more information, but increases the size of the data.

You will have to choose the best approach for your situation.

We created the files by converting a Text file with the complete set of Char values with the Apple File Exchange utility (included with each set of System disks). We chose the Mac-ProDOS option (Text Translation...) and generated both single and multiple character conversions. I then combined the results with Excel.

You can get the Apple File Exchange Technical Reference package from APDA (M7051) and possibly use some of the routines from there. (I am not sure if the results are useful only with AFE or if you can link them into your own application.)

If the AFE tools are inappropriate for your situation, then it would be easy to take the following data and just do a table conversion. You will need to use a font like Courier to see the complete Macintosh character set.

ASCII        Mac        Single     Multiple
128           Ä          A          A"
129           Å          A          AA
130           Ç          C          C,
131           É          E          E'
132           Ñ          N          N~
133           Ö          O          O"
134           Ü          U          U"
135           á          a          a'
136           à          a          a`
137           â          a          a^
138           ä          a          a"
139           ã          a          a~
140           å          a          aa
141           ç          c          c,
142           é          e          e'
143           è          e          e`
144           ê          e          e^
145           ë          e          e"
146           í          i          i'
147           ì          i          i`
148           î          i          i^
149           ï          i          i"
150           ñ          n          n~
151           ó          o          o'
152           ò          o          o`
153           ô          o          o^
154           ö          o          o"
155           õ          o          o~
156           ú          u          u'
157           ù          u          u`
158           û          u          u^
159           ü          u          u"
160           +          t          t

Previous Technote | Contents | Next Technote