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

Can't encode UTF8 characters in shell #167

Open
culebron opened this issue Apr 1, 2016 · 0 comments
Open

Can't encode UTF8 characters in shell #167

culebron opened this issue Apr 1, 2016 · 0 comments

Comments

@culebron
Copy link
Contributor

culebron commented Apr 1, 2016

When I try to encode a file with Cyrillic characters, it works ok. But when I try writing it to stdout, it fails:

    %html
    %head
        %meta{:charset => "utf-8"}
        %meta{:property => "og:url", :content => "http://peshemove.org/j/"}
        %meta{:property => "og:type", :content => "article"}
        %meta{:property => "og:title", :content => "В орфографические словари вошли «овуляшечки», «смузи» и «люляки»"}

Shell:

 hamlpy index.haml 

(ok)

STDOUT:

hamlpy index.haml > index.html
Traceback (most recent call last):
  File "/usr/local/bin/hamlpy", line 9, in <module>
    load_entry_point('hamlpy==0.82.2', 'console_scripts', 'hamlpy')()
  File "/usr/local/lib/python2.7/dist-packages/hamlpy/hamlpy.py", line 67, in convert_files
    print output
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 231: ordinal not in range(128)
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

1 participant