You are doing too much.
In this case, you only need to do: parsedData = Uri.encodeComponent(STR_DATA); to get the same result as the Python code.
You are doing too much.
In this case, you only need to do: parsedData = Uri.encodeComponent(STR_DATA); to get the same result as the Python code.