<font face="times new roman,serif">I'm not familiar with the code, but I think that (A) may actually be:</font><div><font face="times new roman,serif"><br></font></div><div><span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgba(255, 255, 255, 0.917969); ">A (IE, Chrome): Unicode if the (single) 'script' of the string matches one of the scripts of the user's language(s) in the options,</span><br style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgba(255, 255, 255, 0.917969); ">
<span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgba(255, 255, 255, 0.917969); ">Punycode otherwise.</span></div><div><br></div><div>It is pretty easy and reliable to detect the script of the string, whereas language detection would be unreliable.</div>
<div><br></div><div>(It would be possible to match the characters of the string against the "customary" characters used in the user's languages in the options, but that would be trickier, and is probably not worth it.)<br style="background-color: rgba(255, 255, 255, 0.917969); ">
<font face="'times new roman', serif"><div style="background-color:transparent;margin-top:0px;margin-left:0px;margin-bottom:0px;margin-right:0px;font-family:Times;font-size:medium"><span style="font-family:'times new roman', serif;font-size:small"><br>
</span></div><div style="background-color:transparent;margin-top:0px;margin-left:0px;margin-bottom:0px;margin-right:0px;font-family:Times;font-size:medium"><span style="font-family:'times new roman', serif;font-size:small">Mark</span></div>
</font><font face="'times new roman', serif"><i>— Il meglio è l’inimico del bene —</i></font><div><font face="'times new roman', serif"><i><br></i></font><div><font face="'times new roman', serif"><i><span style="font-style:normal"><div style="background-color:transparent;margin-top:0px;margin-left:0px;margin-bottom:0px;margin-right:0px">
[<a href="https://plus.google.com/114199149796022210033" target="_blank">https://plus.google.com/114199149796022210033</a>]</div><i></i></span><i></i></i></font></div></div><br>
<br><br><div class="gmail_quote">On Fri, Dec 9, 2011 at 09:49, Andrew Sullivan <span dir="ltr"><<a href="mailto:ajs@anvilwalrusden.com">ajs@anvilwalrusden.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":1mn">This approach sucks in all the ways you say.  I think it is the worst<br>
option.<br>
<br>
I think that the right approach would be A _if_ you could get the<br>
advantages of B automatically somehow.  At the moment, however, I<br>
think all the answers are bad ones.<br>
<div class="im"></div></div></blockquote></div><br></div>