I see that you're trying to encode the whole URL in one go using some low-level module. This doesn't work, you'd need to either manually split the URL into components and convert parts that do need converting, or use a higher level tool, such as Net::IDN::Encode -- 1KB // Yo momma uses IPv4!