From vladimir@cs.ualberta.ca Thu Feb 1 09:03:02 EST 1996 Article: 28077 of soc.culture.bulgaria Path: news.cs.columbia.edu!news.columbia.edu!panix!bloom-beacon.mit.edu!newsfeed.internetmci.com!uwm.edu!lll-winken.llnl.gov!enews.sgi.com!decwrl!tribune.usask.ca!rover.ucs.ualberta.ca!alberta!usenet From: Vladimir Alexiev Newsgroups: soc.culture.bulgaria Subject: Re: Bulgarian keyboard layouts Date: 31 Jan 1996 15:53:34 -0700 Organization: University of Alberta, Computing Science Lines: 79 Sender: vladimir@tees.cs.ualberta.ca Message-ID: References: <3109D726.370E@pop.uky.edu> <4elrdb$2v9@news.cict.fr> NNTP-Posting-Host: tees.cs.ualberta.ca In-reply-to: Gavrilov's message of 30 Jan 1996 19:26:35 GMT To: Gavrilov X-Newsreader: Gnus v5.0 Status: RO In article <4elrdb$2v9@news.cict.fr> Gavrilov writes: > > Can you help me? I have a Macintosh and cyrilic fonts. I wont to send my > texts in cyrilic by e-mail to someone that has a PC. However the > cyrillic Mac fonts and the PC ones seem to be not compatible. What can > we do? Thanks. If you know a bit of C and have access to a C compiler, one solution is to install filters at both ends that would translate from the Mac encoding to 7-bit ASCII and then to the PC encoding. This also eliminates possible problems with having to send 8-bit text through email. However, this can only work for text files, not wordprocessor files. The 7-bit ASCII looks something like: This is English, /+a towa we~e e bylgarski. /-more English. and can be produced/read by a human, if need be. Below is the source for the outgoing and incoming filter. You'll need to modify the outgoing filter (frompc) to suit the Mac encoding. /* frompc.c */ #define ESC '/' /* the escape char */ #include #include #include char xlat[64+1]="\ ABWGDEVZIJKLMNOPRSTUFHC~{}Y@X@|Q\ abwgdevzijklmnoprstufhc`[]y@x@\\q"; void main(void) { int cyr=0; /* cyr mode on */ int c; while ((c=getch())!=EOF) { if (c<128) { if (cyr && strchr(xlat,c)) { putch(ESC); putch('-'); cyr=0; } putch(c); } else { if (!cyr) { putch(ESC); putch('+'); cyr=1; } putch(xlat[c-128]); } } } /* topc.c */ #define ESC '/' /* the escape char */ #include #include #include char xlat[64+1]="\ ABWGDEVZIJKLMNOPRSTUFHC~{}Y@X@|Q\ abwgdevzijklmnoprstufhc`[]y@x@\\q"; void main(void) { int cyr=0; /* cyr mode on */ int esc=0; /* ESC was read */ int c; char *s; while ((c=getch(stdio))!=EOF) { if (esc) { esc=0; if (c=='+') { cyr=1; continue; } if (c=='-') { cyr=0; continue; } putch(ESC); } if (c==ESC) { esc=1; continue; } if (cyr && (s=strchr(xlat,c))!=NULL) c=128+xlat-s; putchar(c); } if (esc) putch(ESC); }