diff --git a/mbed_greentea/mbed_report_api.py b/mbed_greentea/mbed_report_api.py
index 166bc29..22a3778 100644
--- a/mbed_greentea/mbed_report_api.py
+++ b/mbed_greentea/mbed_report_api.py
@@ -42,7 +42,7 @@ def exporter_json(test_result_ext, test_suite_properties=None):
         for suite in target.values():
             try:
                 suite["single_test_output"] = suite["single_test_output"]\
-                                              .decode("unicode_escape")
+                                              .decode("utf-8", "replace")
             except KeyError:
                 pass
     return json.dumps(test_result_ext, indent=4)
@@ -603,7 +603,7 @@ def get_result_overlay_dropdowns(result_div_id, test_results):
     result_output_dropdown = get_dropdown_html(result_output_div_id,
                                                "Test Output",
                                                test_results['single_test_output']
-                                               .decode("unicode-escape")
+                                               .decode("utf-8", "replace")
                                                .rstrip("\n"),
                                                output_text=True)
 

mbedgt crash with UnicodeDecodeError
Hi

I am sorry, but I still get some crash with the new green tea version ...

mbedgt: exporting to HTML file 'C:/mcu/reports/report__mbed_os5_release_non_regression_F756ZG_mbed-os-5.5.7__2017_09_28_00_06.html'...
mbedgt: unexpected error:
	'unicodeescape' codec can't decode bytes in position 6308-6310: truncated \uXXXX escape
Traceback (most recent call last):
  File "C:\Python27\Scripts\mbedgt-script.py", line 11, in <module>
    load_entry_point('mbed-greentea==1.3.0', 'console_scripts', 'mbedgt')()
  File "c:\python27\lib\site-packages\mbed_greentea\mbed_greentea_cli.py", line 416, in main
    cli_ret = main_cli(opts, args)
  File "c:\python27\lib\site-packages\mbed_greentea\mbed_greentea_cli.py", line 1067, in main_cli
    html_report = exporter_html(test_report)
  File "c:\python27\lib\site-packages\mbed_greentea\mbed_report_api.py", line 747, in exporter_html
    test_results)
  File "c:\python27\lib\site-packages\mbed_greentea\mbed_report_api.py", line 636, in get_result_overlay
    overlay_dropdowns = get_result_overlay_dropdowns(result_div_id, test_results)
  File "c:\python27\lib\site-packages\mbed_greentea\mbed_report_api.py", line 598, in get_result_overlay_dropdowns
    .decode("unicode-escape")
UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 6308-6310: truncated \uXXXX escape

@theotherjimmy 

diff --git a/test/report_api.py b/test/report_api.py
index 122e26e..2a4275f 100644
--- a/test/report_api.py
+++ b/test/report_api.py
@@ -45,7 +45,7 @@ class ReportEmitting(unittest.TestCase):
                     u'build_path_abs': u'N/A',
                     u'copy_method': u'N/A',
                     u'image_path': u'N/A',
-                    u'single_test_output': b'N/A',
+                    u'single_test_output': b'\x80abc\uXXXX' ,
                     u'platform_name': u'k64f',
                     u'test_bin_name': u'N/A',
                     u'testcase_result': {},

pip install -e .
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio
apt-get update apt-get install -y gcc
3.6
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
appdirs==1.4.4
attrs==22.2.0
beautifulsoup4==4.12.3
certifi==2021.5.30
charset-normalizer==2.0.12
colorama==0.3.9
coverage==6.2
execnet==1.9.0
fasteners==0.19
future==1.0.0
idna==3.10
importlib-metadata==4.8.3
iniconfig==1.1.1
intelhex==2.3.0
junit-xml==1.9
lockfile==0.12.2
-e git+https://github.com/ARMmbed/greentea.git@8f7b28f8ec739156d238304fa4f5f2e5156536f5#egg=mbed_greentea
mbed-host-tests==1.8.15
mbed-ls==1.8.15
mbed-os-tools==1.8.15
mock==5.2.0
packaging==21.3
pluggy==1.0.0
prettytable==2.5.0
py==1.11.0
pyparsing==3.1.4
pyserial==3.5
pytest==7.0.1
pytest-asyncio==0.16.0
pytest-cov==4.0.0
pytest-mock==3.6.1
pytest-xdist==3.0.2
requests==2.27.1
six==1.17.0
soupsieve==2.3.2.post1
tomli==1.2.3
typing_extensions==4.1.1
urllib3==1.26.20
wcwidth==0.2.13
zipp==3.6.0

name: greentea
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - appdirs==1.4.4
      - attrs==22.2.0
      - beautifulsoup4==4.12.3
      - charset-normalizer==2.0.12
      - colorama==0.3.9
      - coverage==6.2
      - execnet==1.9.0
      - fasteners==0.19
      - future==1.0.0
      - idna==3.10
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - intelhex==2.3.0
      - junit-xml==1.9
      - lockfile==0.12.2
      - mbed-host-tests==1.8.15
      - mbed-ls==1.8.15
      - mbed-os-tools==1.8.15
      - mock==5.2.0
      - packaging==21.3
      - pluggy==1.0.0
      - prettytable==2.5.0
      - py==1.11.0
      - pyparsing==3.1.4
      - pyserial==3.5
      - pytest==7.0.1
      - pytest-asyncio==0.16.0
      - pytest-cov==4.0.0
      - pytest-mock==3.6.1
      - pytest-xdist==3.0.2
      - requests==2.27.1
      - six==1.17.0
      - soupsieve==2.3.2.post1
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - wcwidth==0.2.13
      - zipp==3.6.0
prefix: /opt/conda/envs/greentea

test/report_api.py::ReportEmitting::test_report_zero_testcases
test/report_api.py::ReportEmitting::test_report_zero_tests
mbed_greentea/mbed_report_api.py
mbed_greentea/mbed_report_api.py