|
From: Alexander S.K. <al...@be...> - 2014-02-03 10:06:45
|
> I suppose that conversion are made from and to UTF8, as GTK or must > probably use UTF8 only > > I suppose that all the hwg functions use these two function only > Wouldn't it be suitable in a few case to have these functions able to > convert from and to other than UTF8 ? > Could it be a solution to that problem ? > I must say that this problem is too hard for me, and the questions I > said are perhaps stupide ... > Yes, GTK uses utf8, all strings must be in utf8 before displaying on the screen. If strings in our application are in utf8 already, we don't use hwg_setAppLocale(). If not, we set our codepage with hwg_setAppLocale() - so all strings are converted to utf8 before using in GTK functions. If strings in dbf files uses other codepage, we need to convert them to the codepage, which we use in the application. For doing this automatically, we set separately application codepage with hb_cdpSelect() and database codepage - using the CODEPAGE clause of USE command ( in dbview.prg it is done, using the setDataCP() ). Have in mind that the name of a codepage in hwg_setAppLocale() is a name, defined in GTK or somewhere else and it is deffir from the Harbour's codepage name, which is used in hb_cdpSelect() or in USE ... CODEPAGE ... command. Regards, Alexander. |