Skip to content

Commit

Permalink
fixed detecting encoding, attempt 2
Browse files Browse the repository at this point in the history
  • Loading branch information
godfryd committed Oct 15, 2023
1 parent deea8c8 commit 42732ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agent/kraken/agent/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def _trace_log_text2(log_text, output_handler, text, tracing, mask, out_prefix,
log_text_left = lines[1]

enc = chardet.detect(frag_to_print_now)
frag_to_print_now = frag_to_print_now.decode(enc.get('encoding', 'utf-8'), 'ignore')
frag_to_print_now = frag_to_print_now.decode(enc.get('encoding', 'utf-8') or 'utf-8', 'ignore')

if output_handler:
output_handler(frag_to_print_now)
Expand Down

0 comments on commit 42732ff

Please sign in to comment.