# tensorflow::ops::UnicodeTranscode::Attrs Struct Reference

# tensorflow::
ops::
UnicodeTranscode::
Attrs

`
#include <string_ops.h>
`


Optional attribute setters for
[UnicodeTranscode](https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/unicode-transcode#classtensorflow_1_1ops_1_1_unicode_transcode)
.

## Summary

| ### Public attributes ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/unicode-transcode/attrs#structtensorflow_1_1ops_1_1_unicode_transcode_1_1_attrs_1abcd1383b9be66c3a3bb38f35eb35d7c8 = "replace" ` | ` StringPiece ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/unicode-transcode/attrs#structtensorflow_1_1ops_1_1_unicode_transcode_1_1_attrs_1a98f8a37849498e2da67eac2ad35642a2 = false ` | ` bool ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/unicode-transcode/attrs#structtensorflow_1_1ops_1_1_unicode_transcode_1_1_attrs_1afe5534f218249f3369c91e047af3775b = 65533 ` | ` int64 ` |

| ### Public functions ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/unicode-transcode/attrs#structtensorflow_1_1ops_1_1_unicode_transcode_1_1_attrs_1ab1e6a46bf9d2cc08d188a8f65ce5af5f (StringPiece x) ` | ` TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/unicode-transcode/attrs#structtensorflow_1_1ops_1_1_unicode_transcode_1_1_attrs ` Error handling policy when there is invalid formatting found in the input. |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/unicode-transcode/attrs#structtensorflow_1_1ops_1_1_unicode_transcode_1_1_attrs_1a14ef90d95676aea36bd25eb2589cf726 (bool x) ` | ` TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/unicode-transcode/attrs#structtensorflow_1_1ops_1_1_unicode_transcode_1_1_attrs ` Whether to replace the C0 control characters (00-1F) with the ` replacement_char ` . |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/unicode-transcode/attrs#structtensorflow_1_1ops_1_1_unicode_transcode_1_1_attrs_1aff6611b37bc42f8b41c1341a2588c7eb (int64 x) ` | ` TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/unicode-transcode/attrs#structtensorflow_1_1ops_1_1_unicode_transcode_1_1_attrs ` The replacement character codepoint to be used in place of any invalid formatting in the input when ` errors='replace' ` . |

## Public attributes

### errors_

```
StringPiece tensorflow::ops::UnicodeTranscode::Attrs::errors_ = "replace"
```

### replace_control_characters_

```
bool tensorflow::ops::UnicodeTranscode::Attrs::replace_control_characters_ = false
```

### replacement_char_

```
int64 tensorflow::ops::UnicodeTranscode::Attrs::replacement_char_ = 65533
```

## Public functions

### Errors

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::UnicodeTranscode::Attrs::Errors(
  StringPiece x
)
```

Error handling policy when there is invalid formatting found in the input.


The value of 'strict' will cause the operation to produce a InvalidArgument error on any invalid input formatting. A value of 'replace' (the default) will cause the operation to replace any invalid formatting in the input with the
`
replacement_char
`
codepoint. A value of 'ignore' will cause the operation to skip any invalid formatting in the input and produce no corresponding output character.


Defaults to "replace"

### ReplaceControlCharacters

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::UnicodeTranscode::Attrs::ReplaceControlCharacters(
  bool x
)
```

Whether to replace the C0 control characters (00-1F) with the
`
replacement_char
`
.


Default is false.


Defaults to false

### ReplacementChar

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::UnicodeTranscode::Attrs::ReplacementChar(
  int64 x
)
```

The replacement character codepoint to be used in place of any invalid formatting in the input when
`
errors='replace'
`
.


[Any](https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/any#classtensorflow_1_1ops_1_1_any)
valid unicode codepoint may be used. The default value is the default unicode replacement character is 0xFFFD or U+65533.)


Note that for UTF-8, passing a replacement character expressible in 1 byte, such as ' ', will preserve string alignment to the source since invalid bytes will be replaced with a 1-byte replacement. For UTF-16-BE and UTF-16-LE, any 1 or 2 byte replacement character will preserve byte alignment to the source.


Defaults to 65533