edc / bass

Make Bash utilities usable in Fish shell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exception when encountering u'\u2192' character

JLLeitschuh opened this issue · comments

The u2192 character is not supported.

Traceback (most recent call last):
  File "/Users/jonathanleitschuh/.local/share/omf/pkg/bass/functions/__bass.py", line 99, in <module>
    print(script, end='')
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2192' in position 168: ordinal not in range(128)

You have a unicode arrow character ("→") in your environment, maybe to show cute bash prompt? Either remove it, or edit the mentioned line from

print(script, end='')

to the following:

print(script.encode('utf8'), end='')

Hope that works.

Any plans to update the script to support it or would a PR be useful here?

Let me if the fix works? If it does, I can include it. Feel free to submit a PR too.

Haven't had the cycles to try this yet, sorry.