As mentioned, the `str_replace` has been retained as part of the original code.

Do we want it to be replaced with an alternative multi byte replacement method or something?