[cairo] PyCairo crashes

Simon Bächler sbaechler at me.com
Tue Nov 17 15:25:52 PST 2009


Mike

Thanks! That worked!  I haven't tested it on OSX yet but on Windows it 
didn't crash and Zürich is written correctly :-)

Is it possible to add this workaround to the PyCairo documentation?

Best Regards
Simon


cairo-request at cairographics.org schrieb:

If you have a Unicode path, and are sending it to a function that takes 
only strings, you generally want to do:

  path.encode(sys.getfilesystemencoding())

which do the right thing to encode the path into something the low-level 
C "fopen" can understand.

One could argue it might be more "Pythonic" for PyCairo to handle that 
conversion internally, but hopefully the above is the correct workaround.

Mike




More information about the cairo mailing list