[Pythonmac-SIG] Carbon.CoreFoundation - null-terminated unicode strings??

has hengist.podd at virgin.net
Fri Mar 12 14:38:59 EST 2004


Bob wrote:

>>print [c for c in 
>>(fURL.CFURLCopyFileSystemPath(CF.kCFURLPOSIXPathStyle).CFStringGetUnicode())]
>>
>>--> [u'/', u'A', u'p', u'p', u'l', u'i', u'c', u'a', u't', u'i', 
>>u'o', u'n', u's', u'/', u'T', u'e', u'x', u't', u'E', u'd', u'i', 
>>u't', u'.', u'a', u'p', u'p', u'\x00'] -- why is last character 
>>0x00???
>
>You should be using the toPython method to bridge any Carbon.CF instance:

Sorted. Thanks. (One of the hazards of not knowing the API. Any 
documentation available?)

has
-- 
http://freespace.virgin.net/hamish.sanderson/



More information about the Pythonmac-SIG mailing list