Loading ...
Sorry, an error occurred while loading the content.

4368Re: [Cheetahtemplate-discuss] [PATCH] Convert unicode compiled template to an utf8 char buffer when writing to a file

Expand Messages
  • R. Tyler Ballance
    Apr 1, 2009
    • 0 Attachment
      On Wed, Apr 01, 2009 at 12:12:54PM +0200, Jean-Baptiste Quenot wrote:
      > Hello community,
      >
      > Please find attached a patch to address a problem when compiling
      > Unicode templates with "cheetah compile" on the command-line.

      Wonderful, I've applied your patch after running the full test suite
      against it, looks good to me :)


      This is currently in "next" and will go out with v2.1.1 on the 16th.


      Thanks for providing it as a .patch :)

      > From 3fc83fb2f1d60fff083ff46d1e6295a2f999618b Mon Sep 17 00:00:00 2001
      > From: Jean-Baptiste Quenot <jbq@...>
      > Date: Wed, 1 Apr 2009 12:08:14 +0200
      > Subject: [PATCH] Convert unicode compiled template to an utf8 char buffer when writing to a file
      >
      > ---
      > src/CheetahWrapper.py | 2 +-
      > 1 files changed, 1 insertions(+), 1 deletions(-)
      > mode change 100755 => 100644 src/CheetahWrapper.py
      >
      > diff --git a/src/CheetahWrapper.py b/src/CheetahWrapper.py
      > old mode 100755
      > new mode 100644
      > index 5e3d6dd..75135eb
      > --- a/src/CheetahWrapper.py
      > +++ b/src/CheetahWrapper.py
      > @@ -622,7 +622,7 @@ be named according to the same rules as Python modules.""" % tup)
      > sys.stdout.write(output)
      > else:
      > f = open(dst, 'w')
      > - f.write(output)
      > + f.write(output.encode('utf8'))
      > f.close()
      >
      >
      > --
      > 1.6.0.4
      >

      > ------------------------------------------------------------------------------

      > _______________________________________________
      > Cheetahtemplate-discuss mailing list
      > Cheetahtemplate-discuss@...
      > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss


      --
      -R. Tyler Ballance
      Slide, Inc.
    • Show all 16 messages in this topic