Punycode
From Google Mapki
If your domain name contains non-ascii characters, then requests to that page are converted into Punycode.
E.g. if your domain name is "www.testmit�?¼.de", any request to that page will be converted to "www.xn--testmit-t2a.de", in which the non-ascii character has been replaced by a variant of unicode encoding.
The problem is that some browsers return the Punycode version of the domain name in window.location.host, and others (notably Firefox) return the non-ascii version. The API code checks the contents of window.location.host against the URL that you used when you registered the API key. If you registered the Punycode version then the API key check will fail under Firefox 1.5 beta 2, and if you registered the non-ascii version, it will fail under most other browsers.
What you have to do is register both versions of the key, then add code to your page to check which version of the domain name is being returned in window.location.host and use the corresponding key.
Like this:
<script type="text/javascript"> var key1 = '<' + 'script src="http://maps.google.com/maps?file=api&v=1&key=xxxxxxxxxx" type="text/javascript">'+'<'+'/script>'; var key2 = '<' + 'script src="http://maps.google.com/maps?file=api&v=1&key=yyyyyyyyyy" type="text/javascript">'+'<'+'/script>'; // if (window.location.host == 'www.xn--testmit-t2a.de') { document.write(key1); } else { document.write(key2); } </script>
Note that '<script' and '</script' are magic. You can't use them inside Javascript quoted strings. So you have to use the trick of constructing them like '<'+'script'.
