[Metakit] 3 questions...

Michael Schlenker schlenk at uni-oldenburg.de
Mon Aug 8 16:21:20 CEST 2005


Brian Kelley wrote:
> On 8/7/05, Brian Myers <tarkawebfoot at charter.net> wrote:
> 
>>I can live without unicode for now, but I hope there's plans to include
>>it in the future. BSDDB doesn't really support unicode either. Does the
>>C interface support it?
> 
> The only way I know for doing unicode is
> vw2 = st.getas("t[a:b]")
> p = u'hi'
> vw2.append(a=repr(p))
> metakit.dump(vw2)
>  a    
>  -----
>  u'hi'
>  -----
> 
> unfortunately, you need to evaluate the unicode string on the way out as well.

At least the Tcl binding has no problems with using unicode with
Metakit, if one uses the binary type for fields (s works too for Tcls
internal utf-8 variant which recodes \0 with hex C080).

Don't know how intelligent pythons unicode handling is.

Michael




More information about the Metakit mailing list