func FromPunycode(s string) string {
	tokens := dns.SplitDomainName(s)
	switch {
	case s == "":
		return ""
	case tokens == nil:  
		return "."
	case s[len(s)-1] == '.':
		tokens = append(tokens, "")
	}
	for i := range tokens {
		tokens[i] = string(decode([]byte(tokens[i])))
	}
	return strings.Join(tokens, ".")
}
FromPunycode returns unicode domain name from provided punycode string.
package idn
import (
	"bytes"
	"github.com/socketplane/socketplane/Godeps/_workspace/src/github.com/miekg/dns"
	"strings"
	"unicode"
)
const (
	_MIN  rune = 1
	_MAX  rune = 26
	_SKEW rune = 38
	_BASE rune = 36
	_BIAS rune = 72
	_N    rune = 128
	_DAMP rune = 700
	_DELIMITER = '-'
	_PREFIX    = "xn--"
)
func ToPunycode(s string) string {
	tokens := dns.SplitDomainName(s)
	switch {
	case s == "":
		return ""
	case tokens == nil:  
		return "."
	case s[len(s)-1] == '.':
		tokens = append(tokens, "")
	}
	for i := range tokens {
		tokens[i] = string(encode([]byte(tokens[i])))
	}
	return strings.Join(tokens, ".")
}