It works quite well. str can also contain non-ascii symbols