     
     for ch in name.unicodeScalars {
         if ch.value < 0x80 {
-            y.append(UInt8(ch))
+            y.append(UInt8(ch.value))
             continue
         }
         isASCII = false
         
         if ch.value < 0x100 {
-            y.append(UInt8(ch))
+            y.append(UInt8(ch.value))
             continue
         }
         // might be a combining character that when combined with the

            return
        }
        
        y.append(UInt8(repl))
    }
    
    if isASCII {


var memoizer = [String: UnicodeScalar]()

private func lookup(base:UnicodeScalar, combi:UnicodeScalar) -> UnicodeScalar {
    let combined = "\(base)\(combi)"
    
    if let y = memoizer[combined] {
