(value)
| 754 | # Where Env Var Names Can Be Mixed Case |
| 755 | encoding = sys.getfilesystemencoding() |
| 756 | def encode(value): |
| 757 | if not isinstance(value, str): |
| 758 | raise TypeError("str expected, not %s" % type(value).__name__) |
| 759 | return value.encode(encoding, 'surrogateescape') |
| 760 | def decode(value): |
| 761 | return value.decode(encoding, 'surrogateescape') |
| 762 | encodekey = encode |