aboutsummaryrefslogtreecommitdiffstats
path: root/lib/debugger/src/int.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2017-03-30 15:30:54 +0200
committerHans Bolinder <[email protected]>2017-04-07 08:57:27 +0200
commit55f4e2b93c92607a5a1c798541f101bae3e9247d (patch)
treef0da5d10aa3a2968ccf3a2f9c19d1d73498675d0 /lib/debugger/src/int.erl
parent15a631cb2ec70860bc58492020904b1b16fed5c4 (diff)
downloadotp-55f4e2b93c92607a5a1c798541f101bae3e9247d.tar.gz
otp-55f4e2b93c92607a5a1c798541f101bae3e9247d.tar.bz2
otp-55f4e2b93c92607a5a1c798541f101bae3e9247d.zip
debugger: Show Latin-1 code correctly
Diffstat (limited to 'lib/debugger/src/int.erl')
-rw-r--r--lib/debugger/src/int.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/debugger/src/int.erl b/lib/debugger/src/int.erl
index e5bade9abe..fdf5957182 100644
--- a/lib/debugger/src/int.erl
+++ b/lib/debugger/src/int.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2016. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2017. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -533,7 +533,9 @@ load({Mod, Src, Beam, BeamBin, Exp, Abst}, Dist) ->
case erl_prim_loader:get_file(filename:absname(Src)) of
{ok, SrcBin, _} ->
MD5 = code:module_md5(BeamBin),
- Bin = term_to_binary({interpreter_module,Exp,Abst,SrcBin,MD5}),
+ SrcBin1 = unicode:characters_to_binary(SrcBin, enc(SrcBin)),
+ true = is_binary(SrcBin1),
+ Bin = term_to_binary({interpreter_module,Exp,Abst,SrcBin1,MD5}),
{module, Mod} = dbg_iserver:safe_call({load, Mod, Src, Bin}),
_ = everywhere(Dist,
fun() ->