diff --git a/examples/networking/http_filter/http-parse-complete.py b/examples/networking/http_filter/http-parse-complete.py index abf5f0f2c5d3..324232d54ea9 100644 --- a/examples/networking/http_filter/http-parse-complete.py +++ b/examples/networking/http_filter/http-parse-complete.py @@ -34,7 +34,7 @@ def toHex(s): lst = "" for ch in s: - hv = hex(ch).replace('0x', '') + hv = hex(ord(ch)).replace('0x', '') if len(hv) == 1: hv = '0' + hv lst = lst + hv