[gtkada] Gtkada.Intl on Windows
Michael Bode
michael.bode at laserline.de
Mon Aug 21 14:35:00 CEST 2006
Michael Bode schrieb:
> Probably I have to either build my own version of libglade using the
> same libintl-1 that GtkAda uses. Or build GtkAda using the intl.dll
> from Gtk 2.8.9. Otherwise glade's libintl doesn't know about calls to
> Bind_Text_Domain from the Ada side.
Ok, now this also works but I've found another problem. dgettext returns
strings in what it thinks to be the system's character set. On my Linux
box this happens to be UTF-8 but not on Windows. I can convert the
strings to UTF-8 with GtkAda's conversion function, but this doesn't
help with libglade. And even without libglade it is an unnessesary
function call, because libintl can do the conversion for you. Therefor I
suggest to add the following procedure to GtkAda.Intl:
procedure Bind_Text_Domain_Codeset (Domain : String; Codeset : String);
-- Specify the Codeset for the specified Domain message catalog
-- This overrides the default system locale data base.
------------------------------
-- Bind_Text_Domain_Codeset --
------------------------------
procedure Bind_Text_Domain_Codeset (Domain : String; Codeset : String) is
procedure Internal (Domain, Codeset : String);
pragma Import (C, Internal, "bind_textdomain_codeset");
begin
Internal (Domain & ASCII.NUL, Codeset & ASCII.NUL);
end Bind_Text_Domain_Codeset;
--
Michael Bode
Laserline GmbH
Fraunhoferstr.
56218 Mülheim-Kärlich
Phone: +49 2630 964-2200
Fax: +49 2630 964-2209
More information about the gtkada
mailing list