Re: Minimal international support for Amaya?

Hi Peter,

The support of international characters in Amaya is quite complex.
Of course we could switch to ISO-8859-2 charset to support another
subset of European languages, but the right general solution is to
handle Unicode characters.
This implies 3 steps:
1- Replacing the handling of 8 bits characters by Unicode functions.
   Due to external constraints, sometimes Unicode characters must be
   encoded as UTF-8 strings, sometimes they must be encoded as
   wide-characters.
   So the adaptation of the code is not easy and adequate conversion
   functions must be developed.
2- We need also to write displaying functions that'll find for each
   character the right font and the right glyph within the font.
   Theses functions depends on the platform (Windows or X-Windows).
3- Then several input methods should be added to the Amaya code.

Just the step 1 is quite finished now.

> Hello,
> =-==-=
> 
> Amaya 5.1 does not properly support input and displaying of international
> characters. It does not even call "setlocale" to be at least partially
> prepared for it. Still I am using ISO-8859-2 charset and I desperately need
> Amaya to work properly for me.
>  
> I made Amaya execute "setlocale" by inserting two lines into
> Amaya/batch/writeapp.c, here is the patch:
> 
> --- writeapp-orig.c     Fri Mar 30 18:06:28 2001
> +++ writeapp.c  Wed Aug  1 23:32:31 2001
> @@ -52,6 +52,7 @@
>     fprintf (file, "/* File generated by app - do not edit! */\n");
>     fprintf (file, "/* #################################### */\n");
>     fprintf (file, "/* Included files */\n");
> +   fprintf (file, "#include \<locale.h\>\n");
>     fprintf (file, "#include \"string.h\"\n");
>     fprintf (file, "#include \"thot_gui.h\"\n");
>     fprintf (file, "#include \"thot_sys.h\"\n");
> @@ -541,6 +542,7 @@
>        fprintf (AppFile, "  int lg; /* identify dialogue messages */\n");
>        fprintf (AppFile, "  char appName[MAX_PATH]; /* name of the application */\n");
>        fprintf (AppFile, "  char workName[MAX_PATH]; /* path of the application */\n");
> +      fprintf (AppFile, "  setlocale\(LC_ALL,\"\"\);\n");
>        
>        fprintf (AppFile, "  /* initialize the Registry */\n");
>        fprintf (AppFile, "  TtaInitializeAppRegistry (argv[0]);\n");
> 
> 
> As I am very new to Amaya I do not know the source very well so I have put
> it in the first place that seemed to be suitable.
> 
> This was not sufficient, though. Amaya now loads the locale, yet it doesn't
> load the proper font and it does not accept a modifier key (that is, key
> with acute, circumflex and other special "decorations").
> 
> This is however too difficult for me to implement. Would PLEASE somebody be
> so kind to implement at least a font selection dialog which would allow the
> user to select also the font encoding? I suppose that would not be difficult
> for a skilled programmer (I am not such a one). That would solve the font
> displaying problems. Or is there a nicer way to solve it?
> 
> Thanks a lot. I will try to help as much as I can.
> 
> All the very best,
> Peter

Received on Tuesday, 14 August 2001 08:57:34 UTC