<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "System",
  "identifier" : "/documentation/System/CInterop/PlatformUnicodeEncoding",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "System"
    ],
    "preciseIdentifier" : "s:6System8CInteropO23PlatformUnicodeEncodinga"
  },
  "title" : "CInterop.PlatformUnicodeEncoding"
}
-->

# CInterop.PlatformUnicodeEncoding

The platform’s preferred Unicode encoding. On Unix this is UTF-8 and on
Windows it is UTF-16. Native strings may contain invalid Unicode,
which will be handled by either error-correction or failing, depending
on API.

```
typealias PlatformUnicodeEncoding = UTF8
```

---

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)