text_encoding
Encoding related utilities.
CEscape(text, as_utf8)
Escape a bytes string for use in an text protocol buffer.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text | A byte string to be escaped. | required | |
as_utf8 | Specifies if result may contain non-ASCII characters. In Python 3 this allows unescaped non-ASCII Unicode characters. In Python 2 the return value will be valid UTF-8 rather than only ASCII. | required |
Returns: Escaped string (str).
Source code in client/ayon_nuke/vendor/google/protobuf/text_encoding.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
CUnescape(text)
Unescape a text string with C-style escape sequences to UTF-8 bytes.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text | The data to parse in a str. | required |
Returns: A byte string.
Source code in client/ayon_nuke/vendor/google/protobuf/text_encoding.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
|