[sword-devel] Hebrew Input help

Yeshiah Zalman sword-devel@crosswire.org
Tue, 14 Dec 1999 14:55:03 -0500


OK now rather than use a separate program for Hebrew entry I have a better solution. Greek does not present this same problem.   We
simply need a routine which will read the input text from the SearchTextBox, copy to a buffer,  remapp the text, and reverse the
result. THEN past back to the search box.   I wrote a DOS C converter program some years ago. Here is the conversion routing I used.
Perhaps it could be modified (I am not qualified here) and then a button in the search form could be added.

Then anyone using the Hebrew modules would be able to search without the need for an external program?

shayah


my old code
==========


if(*argv[1]=='k') /* CONVERT ISRAELI Keyboard to ISO */
 {
   while(old != EOF) {    /* loop till end-of-file */

     old = fgetc(src);            /* read 1 byte  */

              new=old;
if (old=='t') new=224;  /* Numbers are ASCII CHAR values */
if (old=='c') new=225;
if (old=='d') new=226;
if (old=='s') new=227;
if (old=='v') new=228;
if (old=='u') new=229;
if (old=='z') new=230;
if (old=='j') new=231;
if (old=='y') new=232;
if (old=='h') new=233;
if (old=='f') new=235;
if (old=='l') new=234;
if (old=='k') new=236;
if (old=='n') new=238;
if (old=='o') new=237;
if (old=='b') new=240;
if (old=='i') new=239;
if (old=='x') new=241;
if (old=='g') new=242;
if (old=='p') new=244;
if (old==';') new=243;
if (old=='m') new=246;
if (old=='.') new=245;
if (old=='e') new=247;
if (old=='r') new=248;
if (old=='a') new=249;
if (old==',') new=250;   /* Numbers are ASCII CHAR values */


 fprintf(stdout,"%c",new);    /* output it    */
   }; /* End Loop on EOF */
   fclose(src);  /* close file, all done. */
   }