Glad to read all this, it makes a lot of sense. I'm in full support of option 3. In PHP from my experience parse_url can eat up any unicode I throw at it. I did not have to do any DNS lookup as I implemented a server and not a client. Percent decoding is also easy.