diff options
author | Siri Hansen <[email protected]> | 2013-01-25 18:07:04 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2013-01-25 18:07:04 +0100 |
commit | 22bb6f45c1c6305d494dc73004d81066d64d2183 (patch) | |
tree | 7bcc885ae80f0db476cbaded8aa9a2b85b7b165e /lib/test_server/src/test_server_gl.erl | |
parent | 3fb4def74a64a63fbb2b28aef6c5920d7db3ad6e (diff) | |
parent | 7a056d997ca002a99fec6d303b7077294c1d999b (diff) | |
download | otp-22bb6f45c1c6305d494dc73004d81066d64d2183.tar.gz otp-22bb6f45c1c6305d494dc73004d81066d64d2183.tar.bz2 otp-22bb6f45c1c6305d494dc73004d81066d64d2183.zip |
Merge branch 'siri/unicode'
* siri/unicode:
[test_server] Don't escape : and @ in test log links
[test_server] Don't create latin1 filenames if filename mode is utf8
[test_server] Ensure correct encoding in header for erl2html2:convert
[common_test] Update common test modules to handle unicode
[ts] Use unicode:characters_to_list/2 instead of binary_to_list/1
[test_server] Add tests for unicode support
[test_server] Write link target with correct encoding in erl2html2
[test_server] Update test_server to handle unicode
Update preloaded init.beam
Make arguments given with -s option to erl aware of file name encoding
OTP-10702
OTP-10783
Diffstat (limited to 'lib/test_server/src/test_server_gl.erl')
-rw-r--r-- | lib/test_server/src/test_server_gl.erl | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/test_server/src/test_server_gl.erl b/lib/test_server/src/test_server_gl.erl index d32c7c07dc..0ab0d58040 100644 --- a/lib/test_server/src/test_server_gl.erl +++ b/lib/test_server/src/test_server_gl.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2012. All Rights Reserved. +%% Copyright Ericsson AB 2012-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -223,20 +223,12 @@ do_set_props([{reject_io_reqs,Bool}|Ps], St) -> do_set_props([], St) -> St. io_req({put_chars,Enc,Bytes}, _, _) when Enc =:= latin1; Enc =:= unicode -> - to_latin1(Enc, Bytes); + unicode:characters_to_list(Bytes, Enc); io_req({put_chars,Encoding,Mod,Func,[Format,Args]}, _, _) -> Str = Mod:Func(Format, Args), - to_latin1(Encoding, Str); + unicode:characters_to_list(Str, Encoding); io_req(_, _, _) -> passthrough. -to_latin1(unicode, Str) -> - [if C > 255 -> - io_lib:format("\\{~.8B}", [C]); - true -> - C - end || C <- unicode:characters_to_list(Str, unicode)]; -to_latin1(latin1, Str) -> Str. - output(Level, Str, Sender, From, St) when is_integer(Level) -> case selected_by_level(Level, stdout, St) of true -> output(stdout, Str, Sender, From, St); @@ -258,7 +250,7 @@ output(Level, Str, Sender, From, St) when is_atom(Level) -> output_to_file(Level, dress_output(Str, Sender, St), From, St). output_to_file(minor, Data0, From, #st{tc={M,F,A},minor=none}) -> - Data = [io_lib:format("=== ~p:~p/~p\n", [M,F,A]),Data0], + Data = [io_lib:format("=== ~w:~w/~w\n", [M,F,A]),Data0], test_server_io:print(From, unexpected_io, Data), ok; output_to_file(minor, Data, From, #st{minor=Fd}) -> |