'set novalue on' /* force KEXX and its way of SIGNAL ON NOVALUE */ /* Usage: [MACRO] ANSIFY */ /* Bugs: A better name for ANSIFY.KEX would be UNANSIFY. */ /* Requires: Kedit 5.0 (Frank Ellermann, 1998) */ /* ANSIFY translates some ISO LATIN 1 characters to corresponding */ /* codepage 437 characters. This is handy if you want to browse */ /* documents created under WIN 3.1 with KEDIT, but it's a one way */ /* process: don't replace WIN 3.1 files by "ANSI-fied" versions. */ /* If your default codepage is 850 instead of 437 more characters */ /* are translated correctly, but 437 is the first choice: ANSIFY */ /* translates 182 to 20 (both 437 or 850), not to 244 (only 850): */ /* for 182 change d2c(20) to d2c(244) if you prefer codepage 850, */ /* for 167 change d2c(21) to d2c(245) dito, get rid of 21 (=NAK), */ /* for 164 change d2c(15) to d2c(207) dito, 15 was approximative. */ /* The order of characters is significant, ALTER 225 160 ( -> ) */ /* would be incorrect after ALTER 223 225 ( -> ). Deliberately */ /* - both 162 and 248 are translated to 155 (o+/ in codepage 850) */ /* - both 165 and 216 are translated to 157 (O+/ in codepage 850) */ ANSI = '' || '' || '' || '' || '' || '' CODE = d2c(15) || '' || d2c(20) || '' || d2c(21) || '' ANSI = ANSI || '𸩮ĭ' CODE = CODE || 'ĭ폒Ҁǐיؚ֝' ANSI = ANSI || '|' CODE = CODE || 'Ԅ浂|' 'extract /ALT/' ; ALT.1 = ALT.1 + 1 ALT.0 = 0 ; ALT.2 = ALT.2 + 1 do while ANSI <> '' parse var ANSI SOURCE 2 ANSI parse var CODE TARGET 2 CODE 'nomsg alter' c2d( SOURCE ) c2d( TARGET ) 'ALL *' if rc = 0 then ALT.0 = ALT.0 + word( lastmsg.1(), 1 ) end if ALT.0 > 0 then 'set alt' ALT.1 ALT.2 parse upper source . . ALT.1 say ALT.0 'characters ALTERed by' ALT.1