Re: [gnome-db] [Patch] Mergeant does not display Latin1 characters...



El jue, 10 de 04 de 2003 a las 13:34, Rodrigo Moya escribió:
> On Mon, 2003-04-07 at 03:12, Gonzalo Paniagua Javier wrote:
> > Hi!
> > 
> > It seems that when i store the data in UTF8, mergeant fails to render
> > the correct string.
> > 
> > The providers are supposed to return utf8 strings and I realized that
> > server-rs.c does one more conversion...
> > 
> > Ok to commit?
> > 
> I think this should be done in the gnome-db-grid level, or more exactly,
> in gnome-db-model.c#default_value_set_func. Thus, the change will fix it
> for all libgnomedb users, not just mergeant.
> 
> Or am I wrong?

I'm sorry to say it, but yes :-).

All the strings from the providers should be in UTF8 (there was a bug
about that). Getting the encoding of the data in the database and
converting to UTF-8 must be done by the providers.

What mergeant assumes in server_resultset_stringify is that all the
stringified representations are in the locale of the user and that's not
true.

I have a postgres DB with UTF8 data and mergeant (without this patch)
displays it incorrectly because it converts my utf8 strings to utf8
again!!!

The whole point of this is that the providers should know the encoding
in  which the data is and change it into UTF8. Gnome-db-grid should not
do any transformation to the data received from the providers before
displaying it.

-Gonzalo


-- 
Gonzalo Paniagua Javier <gonzalo gnome-db org>
http://www.gnome-db.org/~gonzalo/







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]