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
Migrated issue, originally created by Patate Tomate (@patatetom)
input can be changed with ## -- coding: utf-8 -- :-) but nothing for changing output :-(
## -- coding: utf-8 --
"template is read from stdin, the value defaults to be " "the current directory, otherwise it defaults to be the " "parent directory of the file provided.") + parser.add_argument( + "--output-encoding", default=None, + help="force output encoding") parser.add_argument('input', nargs='?', default='-') options = parser.parse_args(argv) + + output_encoding = options.output_encoding + if options.input == '-': lookup_dirs = options.template_dir or ["."] lookup = TemplateLookup(lookup_dirs) try: - template = Template(sys.stdin.read(), lookup=lookup) + template = Template(sys.stdin.read(), lookup=lookup, output_encoding=output_encoding) except: _exit() else: @@ -52,7 +58,7 @@ def cmdline(argv=None): lookup_dirs = options.template_dir or [dirname(filename)] lookup = TemplateLookup(lookup_dirs) try: - template = Template(filename=filename, lookup=lookup) + template = Template(filename=filename, lookup=lookup, output_encoding=output_encoding) except: _exit()
The text was updated successfully, but these errors were encountered:
Michael Bayer (@zzzeek) wrote:
ill have to merge your patch by hand since you deleted your fork in the PR
Sorry, something went wrong.
or if you can just redo your PR that would help thanks!
Add --output-encoding to mako-render
Fixes: #271 Change-Id: I88b46cfbdea9eda0b4c478dd97829bee8431ff58
→ c480854
Changes by Michael Bayer (@zzzeek):
No branches or pull requests
Migrated issue, originally created by Patate Tomate (@patatetom)
input can be changed with
## -- coding: utf-8 --
:-)but nothing for changing output :-(
The text was updated successfully, but these errors were encountered: