aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-03-05 10:02:01 +0100
committerBjörn-Egil Dahlberg <[email protected]>2015-03-05 10:02:01 +0100
commit0c3b61671a4489c6fdc5581928a9bcbb7ef25e95 (patch)
treee84241138e9ef5a6e315ead23c81a015ce656062 /lib
parentccbf6811b1e0379df30e35bd6265f9221632732c (diff)
parenta7e85df0d940e7f99a61e99de5d1d3ad55cea648 (diff)
downloadotp-0c3b61671a4489c6fdc5581928a9bcbb7ef25e95.tar.gz
otp-0c3b61671a4489c6fdc5581928a9bcbb7ef25e95.tar.bz2
otp-0c3b61671a4489c6fdc5581928a9bcbb7ef25e95.zip
Merge branch 'maint'
Diffstat (limited to 'lib')
-rw-r--r--lib/test_server/src/ts_make.erl12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/test_server/src/ts_make.erl b/lib/test_server/src/ts_make.erl
index 8727f7ebfe..9cb77ecb12 100644
--- a/lib/test_server/src/ts_make.erl
+++ b/lib/test_server/src/ts_make.erl
@@ -67,7 +67,17 @@ get_port_data(Port, Last0, Complete0) ->
end.
update_last([C|Rest], Line, true) ->
- io:put_chars(list_to_binary(Line)), %% Utf-8 list to utf-8 binary
+ try
+ %% Utf-8 list to utf-8 binary
+ %% (e.g. we assume utf-8 bytes from port)
+ io:put_chars(list_to_binary(Line))
+ catch
+ error:badarg ->
+ %% io:put_chars/1 badarged
+ %% this likely means we had unicode code points
+ %% in our bytes buffer (e.g warning from gcc with åäö)
+ io:put_chars(unicode:characters_to_binary(Line))
+ end,
io:nl(),
update_last([C|Rest], [], false);
update_last([$\r|Rest], Result, Complete) ->