|utf8 encoding.patch | (download)
1 1 + 0 - 0 !
10 9 + 1 - 0 !
11 11 + 0 - 0 !
3 files changed, 21 insertions(+), 1 deletion(-)
[patch] handle console output that is improperly encoded
Not sure why, but in some cases the data received from SSHKit claims to
be encoded as UTF-8 but is actually invalid. This causes `gsub` to blow
up with `ArgumentError: invalid byte sequence in UTF-8` when airbrussh
Work around this by detected invalid encoding and stripping out the
offending code points from string before calling `gsub`.