Updates to allow for user names with non latin characters in Windows.

svn: r15939
This commit is contained in:
Peter Landgren
2010-09-30 10:02:41 +00:00
parent 8b7e7aed4e
commit c0f2ed96b2
26 changed files with 133 additions and 57 deletions

View File

@@ -30,6 +30,7 @@
#
#------------------------------------------------------------------------
from gen.ggettext import gettext as _
import sys
#------------------------------------------------------------------------
#
@@ -85,7 +86,8 @@ class PdfDoc(libcairodoc.CairoDoc):
top_margin = self.paper.get_top_margin() * DPI / 2.54
# create cairo context and pango layout
surface = cairo.PDFSurface(self._backend.filename, paper_width, paper_height)
filename = self._backend.filename.encode(sys.getfilesystemencoding())
surface = cairo.PDFSurface(filename, paper_width, paper_height)
surface.set_fallback_resolution(300, 300)
cr = pangocairo.CairoContext(cairo.Context(surface))