Skip to content

Conversation

@trnila
Copy link
Contributor

@trnila trnila commented Sep 2, 2017

When tmux window title contains invalid utf-8 sequence, libtmux throws exception, for example:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x96 in position 9: invalid start byte

This can be archieved with accidentaly cating binary data to stdout or with

$ printf '\033k;\x96\033\'

This issue seems to be fixed in tmux (tmux/tmux@8149bc3) - title is set only if it is valid utf-8.

Could we fix this issue by ignoring invalid utf-8 sequences directly in function console_to_str?

@codecov-io
Copy link

codecov-io commented Sep 2, 2017

Codecov Report

Merging #70 into master will decrease coverage by 0.35%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #70      +/-   ##
==========================================
- Coverage   79.71%   79.36%   -0.36%     
==========================================
  Files           8        8              
  Lines         848      848              
==========================================
- Hits          676      673       -3     
- Misses        172      175       +3
Impacted Files Coverage Δ
libtmux/window.py 82.38% <0%> (-0.63%) ⬇️
libtmux/session.py 80.48% <0%> (-0.61%) ⬇️
libtmux/common.py 85.85% <0%> (-0.51%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9a84dd...f9c743e. Read the comment docs.

@tony tony merged commit 90592de into tmux-python:master Sep 2, 2017
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

Successfully merging this pull request may close these issues.

3 participants