Re: dynamic menu creation with bonobo



Hi Jaka,

On Thu, 26 Apr 2001, Jaka Mocnik wrote:
> Michael Meeks wrote:
> > Due to libxml encoding problems, you are forced to get translation
> > right at the same time as mangling strings as they go to XML, either
> > way - a nice side effect.
>
> ekhm. I don't quite understand this. can you give an example?

        The issue is that I designed the new UI handler based on the
assumption that libxml worked - as I expected it to - inasmuch that you   
could stick mixed 8 bit / utf-8 characters through libxml and it would    
handle them transparently without screwing around with the data stream -  
which IMHO it should have no business with [1].

        So, since it is impossible to determine what encoding the
translated string is in, the quick hack to make it always work was to
hexify the strings on their way through. So - the wire format is nice XML
with butt ugly hexified human non-readable strings - however the XML is   
clean UTF-8 that passes libxml's scrutiny.

        The strings are coded and de-coded using bonobo_ui_util_encode /  
decode_str. If you insert attributes named 'label' and 'tip' (eg.) with   
strings encoded using these routines you should find that things work as  
expected.

        This ugly redundancy should go in Gnome / Bonobo 2.0 when we have
libxml2 and a clean translational infastructure that always gives us
utf-8.

        Regards,
        
                Michael.

[1] - seemingly the w3c take issue with this so this is not the case.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot





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