<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/Unicode/UTF32",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s7UnicodeO5UTF32O"
  },
  "title" : "Unicode.UTF32"
}
-->

# Unicode.UTF32

```
@frozen enum UTF32
```

## Topics

### Structures

[`struct Parser`](/documentation/Swift/Unicode/UTF32/Parser)

### Operators

[`static func == (Unicode.UTF32, Unicode.UTF32) -> Bool`](/documentation/Swift/Unicode/UTF32/==(_:_:))

Returns a Boolean value indicating whether two values are equal.

### Instance Properties

[`var hashValue: Int`](/documentation/Swift/Unicode/UTF32/hashValue)

The hash value.

### Instance Methods

[`func hash(into: inout Hasher)`](/documentation/Swift/Unicode/UTF32/hash(into:))

Hashes the essential components of this value by feeding them into the
given hasher.

### Type Aliases

[`typealias CodeUnit`](/documentation/Swift/Unicode/UTF32/CodeUnit)

The basic unit of encoding

[`typealias EncodedScalar`](/documentation/Swift/Unicode/UTF32/EncodedScalar)

A valid scalar value as represented in this encoding

[`typealias ForwardParser`](/documentation/Swift/Unicode/UTF32/ForwardParser)

A type that can be used to parse `CodeUnits` into
`EncodedScalar`s.

[`typealias ReverseParser`](/documentation/Swift/Unicode/UTF32/ReverseParser)

A type that can be used to parse a reversed sequence of
`CodeUnits` into `EncodedScalar`s.

### Type Properties

[`static var encodedReplacementCharacter: Unicode.UTF32.EncodedScalar`](/documentation/Swift/Unicode/UTF32/encodedReplacementCharacter)

A unicode scalar value to be used when repairing
encoding/decoding errors, as represented in this encoding.

### Type Methods

[`static func decode(Unicode.UTF32.EncodedScalar) -> Unicode.Scalar`](/documentation/Swift/Unicode/UTF32/decode(_:)-swift.type.method)

Converts from encoded to encoding-independent representation

[`static func encode(Unicode.Scalar) -> Unicode.UTF32.EncodedScalar?`](/documentation/Swift/Unicode/UTF32/encode(_:))

Converts from encoding-independent to encoded representation, returning
`nil` if the scalar can’t be represented in this encoding.

[`static func isASCII(Unicode.UTF32.CodeUnit) -> Bool`](/documentation/Swift/Unicode/UTF32/isASCII(_:))

Returns whether the given code unit represents an ASCII scalar

### Default Implementations

[Equatable Implementations](/documentation/Swift/Unicode/UTF32/Equatable-Implementations)

[UnicodeCodec Implementations](/documentation/Swift/Unicode/UTF32/UnicodeCodec-Implementations)

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`UnicodeCodec`](/documentation/Swift/UnicodeCodec)

[`Copyable`](/documentation/Swift/Copyable)

[`Equatable`](/documentation/Swift/Equatable)

[`Escapable`](/documentation/Swift/Escapable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)