codeset bugfixes xffm

edscott wilson garcia edscott at imp.mx
Thu Apr 10 05:55:06 CEST 2003


El mié, 09-04-2003 a las 16:46, Olivier Fourdan escribió:
> Hi Edscott,
> 
> But that error is deeply nested in xfdiff4
> 
> If you look at xfdiff_miscc, lines 880 to 900, you'll see that you treat
> the translated message the same way as the filename.
> 
> The filename should be converted to UTF8 as it is right now, but not the
> localized text (as in no_patch_dir, no_right_path, no_patch etc.)
> 
> So the logic behind this code is wrong. Moreover, the code as it is
> right now is a bit, well, tricky to say the least :)
> 
> I think this should be redone in a cleaner way (read big bunch of
> cleanup). 

It's clean now. Eventhough the same function is called, this function
will check the string for valid utf8 before doing any conversion. Only
if it is not valid utf8 code will it be translated. If the system locale
codeset turns out to be something useless like "ASCII", then it will
default to ISO-8859-1, so that the string (which may be the contents of
the file being diff'd) can be shown correctly.

> 
> As a side note, I'm a bit worry about the state of xffm. I've
> encountered yet another bug: Under heavy system workload, deleting a
> file sometimes doesn't update the treeview. Afterwords,  collapsing the
> view crashes xffm...

I've modified the delete routine now. Before it would monitor the whole
tree for changes, which is more cpu intensive and can cause race
conditions under heavy system load. Now I just save the deleted
references in a glist and zap'em.

Please note that for several days the CVS version of the xffm pasteboard
had a show stopper bug (an line that was freeing memory currently in
use). This would cause a segv signal on collapsing or expanding after
cutting or copying anything to the pasteboard. It might be related to
the crashes you had on your system. 

> 
> But hehehe, right now, it's my turn to say good night/good morning ;)
> 
> In the mean time, I've updated CVS with my current changes (that fix the
> problem with localized strings in xffm at least)

I think I've got all the codeset issues with the SMB part. The only
stuff that does not work is that uploading a file with accentuated
characters in the filename to a windows server will screw up the name on
the server (but it works fine with samba servers). Also, top level
shares with accentuated characters in the name are not accesible
(neither in windows nor samba servers). I believe this to be due to bugs
in smbclient (2.2.5). I still have to check the codeset issues when
doing rm or mkdir on a remote server, but I'm pretty sure it will go ok.

And now it's my turn to say good night/morning 8-)


Edscott

> 
> Cheers,
> Olivier.
> 
> On Wed, 2003-04-09 at 23:04, Olivier Fourdan wrote:
> > Hi Edscott,
> > 
> > 
> > On Wed, 2003-04-09 at 21:32, Olivier Fourdan wrote:
> > > Hi Edscott,
> > > 
> > > On Wed, 2003-04-09 at 05:13, edscott wilson garcia wrote:
> > > >   I think all the codeset problems you noticed have now been fixed.
> > > 
> > > Well, no it's not fixed. I'll look into it if I can find any time.
> > 
> > 
> > Ha!! I know!
> > 
> > You call g_locale_to_utf8() function even on localized messages!
> > 
> > E.g.: In dummies.c, I read :
> > 
> > s = g_locale_to_utf8(_("Reading..."), -1, &r_bytes, &w_bytes, NULL);
> > 
> > Since the translations are already in UTF8, The translation on
> > "Reading..." in UTF8
> > 
> > By calling g_locale_to_utf8(), you transform UTF8 to UTF8 assuming that
> > UTF8 is in the locale encoding! SO not surprisingly, you get wrong
> > results if the locale is not UTF8...
> > 
> > Problem, this error is repeated all along the code :(
> > 
> > Cheers,
> -- 
> Olivier Fourdan <fourdan at xfce.org>
> http://www.xfce.org
> 
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> http://moongroup.com/mailman/listinfo/xfce4-dev
> 





More information about the Xfce4-dev mailing list