Floobits / flootty

A collaborative terminal.
Apache License 2.0
175 stars 25 forks source link

ASCII Character problem? #14

Closed jondkinney closed 10 years ago

jondkinney commented 10 years ago

Hi there,

Trying out flootty to pair with some folks and received this error anytime I try to do anything. I'm sure it's because of the characters I have in my zsh prompt... but tons of people have similar customizations. Any way flootty could support them?

Thanks!

You have permission to write to this terminal. Remember: With great power comes great responsibility.
So yea
zsh: command not found: So
% Traceback (most recent call last):
File "/usr/local/bin/flootty", line 8, in <module>
load_entry_point('Flootty==0.21', 'console_scripts', 'flootty')()
File "/Library/Python/2.7/site-packages/flootty/flootty.py", line 290, in main f.select()
File "/Library/Python/2.7/site-packages/flootty/flootty.py", line 408, in select handler(fd)
File "/Library/Python/2.7/site-packages/flootty/flootty.py", line 424, in cloud_read self.handle(buf)
File "/Library/Python/2.7/site-packages/flootty/flootty.py", line 461, in handle self.handle_event(data)
File "/Library/Python/2.7/site-packages/flootty/flootty.py", line 472, in handle_event func(data)
File "/Library/Python/2.7/site-packages/flootty/flootty.py", line 559, in on_term_stdout self.handle_stdio(data['data'])
File "/Library/Python/2.7/site-packages/flootty/flootty.py", line 675, in stdout_write write(stdout, buf)
File "/Library/Python/2.7/site-packages/flootty/flootty.py", line 120, in write n = os.write(fd, b)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u21b5' in position 199: ordinal not in range(128) ciao.
% mini at Mini in ~/floobits/share/jondkinney/bolstr ○ ruby-2.0.0-p247
jondkinney commented 10 years ago

Removing my git prompt status indicators and leading prompt indicator have fixed this issue, but again, it'd be great if those could be supported!

See here: https://github.com/jondkinney/dotfiles/blob/master/zsh_conf/j2fly.zsh-theme#L10-L11

and here: https://github.com/jondkinney/dotfiles/blob/master/zsh_conf/j2fly.zsh-theme#L47-L52

ggreer commented 10 years ago

Thanks for the bug report. I can reproduce this error. Fix incoming...

jondkinney commented 10 years ago

Awesome, thanks @ggreer! I'll give it a shot.