--- a/src/eric7/Utilities/__init__.py Thu Dec 21 19:50:01 2023 +0100 +++ b/src/eric7/Utilities/__init__.py Fri Dec 22 11:04:32 2023 +0100 @@ -1129,14 +1129,16 @@ oc += txt[index] o = chr(int(oc, base=8)) elif c.lower() == "x": - index += 1 val = 0 - if index < len(txt) and txt[index] in "0123456789abcdefABCDEF": + if index + 1 < len(txt) and txt[index + 1] in "0123456789abcdefABCDEF": + index += 1 hx = txt[index] - index += 1 - if index < len(txt) and txt[index] in "0123456789abcdefABCDEF": + if ( + index + 1 < len(txt) + and txt[index + 1] in "0123456789abcdefABCDEF" + ): + index += 1 hx += txt[index] - index += 1 val = int(hx, base=16) o = chr(val) else: