replace str with unicode where possible