(ch, encodeSetO, encodeWhiteSpace)
| 979 | |
| 980 | |
| 981 | def _ENCODE_DIRECT(ch, encodeSetO, encodeWhiteSpace): |
| 982 | c = ord(ch) if isinstance(ch, str) else ch |
| 983 | if c > 127: |
| 984 | return False |
| 985 | if utf7_special[c] == 0: |
| 986 | return True |
| 987 | if utf7_special[c] == 2: |
| 988 | return not encodeWhiteSpace |
| 989 | if utf7_special[c] == 3: |
| 990 | return not encodeSetO |
| 991 | return False |
| 992 | |
| 993 | |
| 994 | def PyUnicode_EncodeUTF7(s, size, encodeSetO, encodeWhiteSpace, errors): |
no test coverage detected