(value)
| 803 | # Where Env Var Names Can Be Mixed Case |
| 804 | encoding = sys.getfilesystemencoding() |
| 805 | def encode(value): |
| 806 | if not isinstance(value, str): |
| 807 | raise TypeError("str expected, not %s" % type(value).__name__) |
| 808 | return value.encode(encoding, 'surrogateescape') |
| 809 | def decode(value): |
| 810 | return value.decode(encoding, 'surrogateescape') |
| 811 | encodekey = encode |