Version 1.6.1 of 17 July 1996 fixes two bugs associated with the handling of non-English languages in MacPGP 2.6.3 v1.6: 1) Version 1.6 expected the file "language.txt" to have either Unix (LF) or DOS (CR-LF) linebreaks but couldn't handle Macintosh (CR) linebreaks. 2) The PGP signon message was not translated into from the ISO 8859-1 Latin character set into the Macintosh character set. 3) There were several mistakes in the translation tables between the ISO 8859-1 Latin character set and the Macintosh character set. Also these tables were based on the original 1980's version of the Macintosh character set, which was subsequently extended to include many more characters. In addition version 1.6.1 has an expanded "language.txt" containing additional messages from the Macintosh interface portion of MacPGP (but without translations). Note to translators: The file "language.txt" is expected to be in the ISO Latin-1 character set. You can use MacPGP to do the character conversion as follows: 1) ISO Latin-1 --> Macintosh Turn OFF the ISO Latin-1 flag in the Options menu. "Sign only" the file with ONLY the following option ON: Treat source as text (All other signing options OFF). Then turn ON the ISO Latin-1 flag and Open/Decrypt the file you just signed. The decrypted file will be in the Macintosh format. 2) Macintosh --> ISO Latin-1 Same as the other way except that you turn ON the ISO Latin-1 before signing the file and you turn OFF the ISO Latin-1 flag before decrypting. The following patch summarizes the differences in the source code between versions 1.6 and 1.6.1 of MacPGP 2.6.3: diff -c :263v1.6:Aestuff.c :263v1.61:Aestuff.c *** :263v1.6:Aestuff.c Wed Jul 17 16:12:03 1996 --- :263v1.61:Aestuff.c Sun Jul 14 18:31:36 1996 *************** *** 1674,1680 **** AEClearDecks(); theResult.dataHandle = nil; gResultPtr = &theResult; ! AddResult("MacPGP 2.6.3 v. 1.6.1 - July 17, 1996"); if (theResult.dataHandle) err = AEPutKeyDesc(theReply, keyDirectObject, &theResult); else --- 1674,1680 ---- AEClearDecks(); theResult.dataHandle = nil; gResultPtr = &theResult; ! AddResult("MacPGP 2.6.3 v. 1.6.1 - July 14, 1996"); if (theResult.dataHandle) err = AEPutKeyDesc(theReply, keyDirectObject, &theResult); else diff -c :263v1.6:charset.c :263v1.61:charset.c *** :263v1.6:charset.c Sun Mar 3 14:05:05 1996 --- :263v1.61:charset.c Wed Jul 17 16:19:41 1996 *************** *** 52,57 **** --- 52,85 ---- 100, 110, 111, 111, 111, 111, 111, 47, 111, 117, 117, 117, 117, 121, 116, 121 }; + /* + * The following table implicitly defines the PGP internal character set as + * a nonstandard extension of the ISO 8859-1 Latin Alphabet 1 consisting of + * the same characters as CP850 but arranged differently. The characters + * in positions 0 to 0x7f and 0xa0 to 0xff are identical to those of ISO 8859-1. + * However ISO 8859-1 leaves the characters in positions 0x80 to 0x9f undefined, + * reserved for use as extended control characters. + * + * This extension of ISO 8859-1 was defined by the Kermit project at Columbia + * and is based on an IBM proposed official invertible translation of CP850. + * Reference: IBM Character Data Representation Architecture (CDRA), Level 1, + * Registry, SC09-1291-00 (1990), p.152. (Note: Latin-1 is IBM Code Page 00819.) + * + * Note 1 : IBM's bizarre rearrangement of control characters and DELETE (0x7f) + * has NOT been adopted in this table. + * + * Note 2: The IBM proposed translation was intended for use in some of its + * cross-platform database products and not really intended for general use. + * Hence the extended ISO 8859-1 characters in the range 0x80-0x9f are unlikely + * to display correctly on platforms which use the ISO 8859-1 character set. + * (Indeed if used with 8-bit unclean hardware/software, they may leave IO + * devices in unpredictable states, since these characters will be interpreted + * as control characters when the 8-th bit is stripped off.) Hence it would be + * a good idea to avoid using the extended ISO 8859-1 characters or characters + * from other platforms which map into them. + */ + + static unsigned char intern2cp850[] = { /* ISO 8859-1 Latin Alphabet 1 (Latin-1) to IBM Code Page 850 (International) */ *************** *** 181,209 **** Boolean iso_latin1 = false; #endif static unsigned char intern2mac[] = { /* ISO 8859-1 Latin Alphabet 1 (Latin1) ! to Macintosh Geneva/Monaco */ ! UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, ! UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, ! 202, 193, 162, 163, 217, 180, 124, 164, 172, 169, 187, 199, 194, 209, 168, 95, ! 188, 177, 50, 51, 171, 181, 166, 165, 44, 49, 161, 200, UNK, UNK, UNK, 192, ! 203, 135, 129, 204, 128, 129, 174, 130, 143, 131, 144, 145, 147, 146, 148, 149, ! 68, 132, 152, 151, 153, 205, 133, 120, 175, 157, 156, 158, 134, 89, 84, 167, ! 136, 135, 137, 139, 138, 140, 97, 141, 143, 142, 144, 145, 147, 146, 148, 149, ! 100, 150, 152, 151, 153, 155, 154, 214, 191, 157, 156, 158, 159, 121, 116, 216 }; static unsigned char ! mac2intern[] = { /* Macintosh Geneva/Monaco to Latin-1 */ 196, 197, 199, 201, 209, 214, 220, 225, 224, 226, 228, 227, 229, 231, 233, 232, 234, 235, 237, 236, 238, 239, 241, 243, 242, 244, 246, 245, 250, 249, 251, 252, ! UNK, 186, 162, 163, 167, 183, 182, 223, 174, 169, UNK, 180, 168, UNK, 198, 216, ! UNK, 177, UNK, UNK, 165, 181, 100, 83, 80, 112, 83, 170, 176, 79, 230, 248, ! 191, 161, 172, UNK, 102, 126, 68, 171, 187, UNK, 160, 192, 195, 213, 79, 111, ! 45, 173, 34, 34, 96, 39, 247, UNK, 255, UNK, UNK, UNK, UNK, UNK, UNK, UNK, ! UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, ! UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK }; /* Russian language specific conversation section */ --- 209,298 ---- Boolean iso_latin1 = false; #endif + /* + * This is a revised translation table between the PGP internal character + * set (extended IS0 8859-1 Latin [see above]) and Macintosh Roman, also + * taken from the Kermit sources. + * + * The translation of the extended IS0 8859-1 characters in the range + * 0x80-0x9f is more or less completely arbitrary. You should avoid using + * translations of these characters if at all possible. (It is the + * philosophy of the Kermit project to make 1-1 translations even if + * they don't make sense.) + * + * There are also a few characters in the standard ISO 8859-1 character + * set which do not have any correspondents in the Macintosh Roman character + * set. They have been also given arbitrary translations: + * 0xa6 in ISO 8859-1 (broken vertical bar) + * ---> 0xc9 in MacRoman (ellipsis = ...) + * 0xb2 in ISO 8859-1 (superscript 2) + * ---> 0xaa in MacRoman (trademark sign) + * 0xb3 in ISO 8859-1 (superscript 3) + * ---> 0xad in MacRoman (not equal sign) + * 0xb9 in ISO 8859-1 (superscript 1) + * ---> 0xb0 in MacRoman (infinity symbol) + * 0xbc in ISO 8859-1 (the fraction 1/4) + * ---> 0xb2 in MacRoman (less than or equal sign) + * 0xbd in ISO 8859-1 (the fraction 1/2) + * ---> 0xb3 in MacRoman (greater than or equal sign) + * 0xbe in ISO 8859-1 (the fraction 3/4) + * ---> 0xba in MacRoman (integral symbol) + * 0xd0 in ISO 8859-1 (Icelandic upper case letter ETH) + * ---> 0xdc in MacRoman (single left pointing angle + * angle quotation mark) + * 0xd7 in ISO 8859-1 (multiplication sign) + * ---> 0xa5 in MacRoman (bullet mark) + * 0xdd in ISO 8859-1 (upper case letter Y with acute accent) + * ---> 0xa0 in MacRoman (dagger mark) + * 0xde in ISO 8859-1 (upper case Icelandic letter THORN) + * ---> 0xde in MacRoman (lower case ligature fi) + * 0xf0 in ISO 8859-1 (Icelandic lower case letter ETH) + * ---> 0xdd in MacRoman (single right pointing angle + * angle quotation mark) + * 0xfd in ISO 8859-1 (lower case y with acute accent) + * ---> 0xe0 in MacRoman (double dagger) + * 0xfe in ISO 8859-1 (lower case Icelandic letter THORN) + * ---> 0xdf in MacRoman (lower case ligature fl) + * + * Note that this translation table differs in many respects from the table used + * in MacPGP 2.6.2 and the earlier release of MacPGP 2.6.3. That translation + * table did not attempt to make a 1-1 translation. Moreover it was based on + * the first version of the Macintosh character set described in the original + * Inside Macintosh. In the late 80's Apple extended the Macintosh character set, + * mainly by adding upper case letters with Scandinavian diacritical marks. + * These additional characters are still missing in the basic Macintosh screen + * fonts (eg. Geneva, Monaco) but they are usually present in PostScript and + * TrueType fonts. MacPGP 2.6.2 translated these upper case Scandinavian + * characters into their lower class equivalents. + * + * Because of this change, separated signatures made with MacPGP 2.6.2 may + * fail to verify in MacPGP 2.6.3. In some cases the same may be true with + * clearsigned documents. + */ + static unsigned char intern2mac[] = { /* ISO 8859-1 Latin Alphabet 1 (Latin1) ! to Macintosh-Latin (from Kermit sources) */ ! 182, 183, 184, 185, 189, 196, 197, 198, 206, 207, 210, 211, 217, 218, 195, 212, ! 209, 215, 213, 226, 227, 228, 240, 245, 246, 247, 249, 250, 251, 253, 254, 255, ! 202, 193, 162, 163, 219, 180, 201, 164, 172, 169, 187, 199, 194, 208, 168, 248, ! 161, 177, 170, 173, 171, 181, 166, 225, 252, 176, 188, 200, 178, 179, 186, 192, ! 203, 231, 229, 204, 128, 129, 174, 130, 233, 131, 230, 232, 237, 234, 235, 236, ! 220, 132, 241, 238, 239, 205, 133, 165, 175, 244, 242, 243, 134, 160, 222, 167, ! 136, 135, 137, 139, 138, 140, 190, 141, 143, 142, 144, 145, 147, 146, 148, 149, ! 221, 150, 152, 151, 153, 155, 154, 214, 191, 157, 156, 158, 159, 224, 223, 216 }; static unsigned char ! mac2intern[] = { /* Macintosh-Latin to Latin-1 (also from Kermit sources) */ 196, 197, 199, 201, 209, 214, 220, 225, 224, 226, 228, 227, 229, 231, 233, 232, 234, 235, 237, 236, 238, 239, 241, 243, 242, 244, 246, 245, 250, 249, 251, 252, ! 221, 176, 162, 163, 167, 215, 182, 223, 174, 169, 178, 180, 168, 179, 198, 216, ! 185, 177, 188, 189, 165, 181, 128, 129, 130, 131, 190, 170, 186, 132, 230, 248, ! 191, 161, 172, 142, 133, 134, 135, 171, 187, 166, 160, 192, 195, 213, 136, 137, ! 173, 144, 138, 139, 143, 146, 247, 145, 255, 140, 141, 164, 208, 240, 222, 254, ! 253, 183, 147, 148, 149, 194, 202, 193, 203, 200, 205, 206, 207, 204, 211, 212, ! 150, 210, 218, 219, 217, 151, 152, 153, 175, 154, 155, 156, 184, 157, 158, 159 }; /* Russian language specific conversation section */ diff -c :263v1.6:language.c :263v1.61:language.c *** :263v1.6:language.c Sun Apr 21 11:19:06 1996 --- :263v1.61:language.c Tue Jul 9 16:29:27 1996 *************** *** 348,359 **** --- 348,367 ---- return; /* use default messages */ } buildfilename(subtitles_file, SUBTITLES_FILE); + #ifdef MACPGP + langf = fopen(subtitles_file, FOPRTXT); /* Open file in text mode... */ + #else langf = fopen(subtitles_file, FOPRBIN); /* Open file in binary mode... */ + #endif if (langf == NULL) { #ifdef PGP_SYSTEM_DIR strcpy(subtitles_file, PGP_SYSTEM_DIR); strcat(subtitles_file, SUBTITLES_FILE); + #ifdef MACPGP + langf = fopen(subtitles_file, FOPRTXT); /* Open file in text mode... */ + #else langf = fopen(subtitles_file, FOPRBIN); /* Open file in binary mode... */ + #endif use_system_wide_lang = 1; if (langf == NULL) #endif diff -c :263v1.6:pgp.c :263v1.61:pgp.c *** :263v1.6:pgp.c Wed Jun 19 20:14:39 1996 --- :263v1.61:pgp.c Sun Jul 14 17:52:06 1996 *************** *** 608,613 **** --- 608,614 ---- buildfilename( mcguffin, "config.txt"); if ( processConfigFile( mcguffin ) < 0 ) err=BAD_ARG_ERROR; + init_charset(); signon_msg(); g_armor_flag=emit_radix_64; g_text_mode=(literal_mode == MODE_TEXT);