<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSString/EncodingConversionOptions",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@E@NSStringEncodingConversionOptions"
  },
  "title" : "NSString.EncodingConversionOptions"
}
-->

# NSString.EncodingConversionOptions

Options for converting string encodings.

```
struct EncodingConversionOptions
```

## Overview

These constants are available in OS X v10.4; they are, however, differently named:

```objc
typedef enum {
    NSAllowLossyEncodingConversion = 1,
    NSExternalRepresentationEncodingConversion = 2
} NSStringEncodingConversionOptions;
```

You can use them in OS X v10.4 if you define the symbols as `extern` constants.

## Topics

### Constants

[`NSStringEncodingConversionAllowLossy`](/documentation/Foundation/NSString/EncodingConversionOptions/allowLossy)

Allows lossy conversion.

[`NSStringEncodingConversionExternalRepresentation`](/documentation/Foundation/NSString/EncodingConversionOptions/externalRepresentation)

Specifies an external representation (with a byte-order mark, if necessary, to indicate endianness).

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

---

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)