Fix getting URL when non-ascii content