         
         switch _CFCharacterSetGetKeyedCodingType(_cfObject) {
         case kCFCharacterSetKeyedCodingTypeBuiltin:
-            aCoder.encode(CFIndex(_CFCharacterSetGetKeyedCodingBuiltinType(_cfObject).rawValue), forKey: .characterSetBuiltinIDKey)
+            aCoder.encode(Int(_CFCharacterSetGetKeyedCodingBuiltinType(_cfObject)), forKey: .characterSetBuiltinIDKey)
             
         case kCFCharacterSetKeyedCodingTypeRange:
             let range = _CFCharacterSetGetKeyedCodingRange(_cfObject)


#if _runtime(_ObjC)
fileprivate let lastKnownPredefinedCharacterSetConstant = kCFCharacterSetNewline.rawValue
#else
fileprivate let lastKnownPredefinedCharacterSetConstant = kCFCharacterSetNewline
#endif

            }
            
        case kCFCharacterSetKeyedCodingTypeBuiltinAndBitmap:
            aCoder.encode(Int(_CFCharacterSetGetKeyedCodingBuiltinType(_cfObject)), forKey: .characterSetNewBuiltinIDKey)
            if isInverted { aCoder.encode(true, forKey: .characterSetNewIsInvertedKey )}
            
            fallthrough
