Is your Web2py source file encoded UTF8?
Have you tried prefacing the string with a lowercase 'u' for unicode?
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
I'm doing an ajax callback that's supposed to update a div with new text:
# action
...
return 'jQuery("#my-target").html("%s");' % clean_str(make_contents(filename
))
def make_contents(filename):
return open(filename, 'rb').read().decode('utf-8')
def clean_str(text):
return str(text).r
2 matches
Mail list logo