maximed in #guix pointed out that there should not be any non-ascii character in a URI, so what I was trying to do is simultaneously parse an IRI and convert it to an URI. For this to work, unicode normalization is required.