Returns True if the key can be directly decoded as UTF-8 string Otherwise False. Keys which can not be encoded directly: - `data` which may contain arbitrary binary data - `desc` or `client` or `FullName` which may contain non-UTF8 encoded text - `depotFile[
(key)
| 843 | |
| 844 | |
| 845 | def p4KeyWhichCanBeDirectlyDecoded(key): |
| 846 | """Returns True if the key can be directly decoded as UTF-8 string |
| 847 | Otherwise False. |
| 848 | |
| 849 | Keys which can not be encoded directly: |
| 850 | - `data` which may contain arbitrary binary data |
| 851 | - `desc` or `client` or `FullName` which may contain non-UTF8 encoded text |
| 852 | - `depotFile[0-9]*`, `path`, or `clientFile` which may contain non-UTF8 encoded text, handled by decode_path() |
| 853 | """ |
| 854 | if key in p4KeysContainingNonUtf8Chars() or \ |
| 855 | key in p4KeysContainingBinaryData() or \ |
| 856 | p4KeyContainsFilePaths(key): |
| 857 | return False |
| 858 | return True |
| 859 | |
| 860 | |
| 861 | def p4CmdList(cmd, stdin=None, stdin_mode='w+b', cb=None, skip_info=False, |
no test coverage detected