Conditions | 4 |
Total Lines | 11 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | #!/usr/bin/env python |
||
33 | def main(): |
||
34 | path = sys.argv[1] |
||
35 | if not sys.stdout.encoding == 'utf-8': |
||
36 | try: |
||
37 | sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8') |
||
38 | except AttributeError: |
||
39 | sys.stdout = codecs.getwriter('utf-8')(sys.stdout) |
||
40 | try: |
||
41 | filter(path, 'utf-8-sig') |
||
42 | except UnicodeDecodeError: |
||
43 | filter(path, 'utf-8') |
||
44 | |||
48 |