Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pystache cannot render Unicode strings containing non-ASCII text. #4

Closed
enaeseth opened this issue Feb 8, 2010 · 5 comments
Closed

Comments

@enaeseth
Copy link
Contributor

enaeseth commented Feb 8, 2010

In Template.render_tag, Pystache converts the value about to be rendered into a string using str(). If that value is a Unicode string containing any non-ASCII characters, rendering will fail with a UnicodeEncodeError.

enaeseth/pystache@f123343 is one way of working around this (really quite annoying) problem.

@defunkt
Copy link
Owner

defunkt commented Feb 9, 2010

Just merged this in, thanks.

@falcoa
Copy link

falcoa commented Sep 18, 2014

I have the same problem and I do not have any idea how to work around.
Any suggestion????

@cjerdonek
Copy link
Collaborator

Are you using the newest version? There is a section on Unicode in the README: https://github.com/defunkt/pystache#unicode

@falcoa
Copy link

falcoa commented Sep 19, 2014

I'm using the pystache version 0.5.4, and python version 2.7

@cjerdonek
Copy link
Collaborator

See this thread for ideas: #168

Try what you see there and reading more, and see if you can figure it out based on that.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants