<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/StringTransform/toUnicodeName",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@NSStringTransformToUnicodeName"
  },
  "title" : "toUnicodeName"
}
-->

# toUnicodeName

An identifier for a transform that converts characters to Unicode names.

```
static let toUnicodeName: StringTransform
```

## Discussion

For example, the string “🐶🐮” transforms to `"``\N{DOG FACE}\N{COW FACE}"` .

Passing this constant to the [`applyTransform(_:reverse:range:updatedRange:)`](/documentation/Foundation/NSMutableString/applyTransform(_:reverse:range:updatedRange:)) method is equivalent to passing <doc://com.apple.documentation/documentation/CoreFoundation/kCFStringTransformToUnicodeName> to <doc://com.apple.documentation/documentation/CoreFoundation/CFStringTransform(_:_:_:_:)>.

> Note:
> The result of a forward transformation delimits each Unicode name with enclosing curly braces and the leading character sequence `"\N"`. In some programming languages, `"\N{...}"` is used as an escape sequence for Unicode characters in strings and regular expressions; this isn’t supported in Swift or Objective-C. To perform the reverse transform of a string literal in Swift or Objective-C, escape the leading backslash (`"\\N{...}"`) for each Unicode name.

---

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)