diff options
author | gbrandl <devnull@localhost> | 2008-11-15 12:20:05 +0100 |
---|---|---|
committer | gbrandl <devnull@localhost> | 2008-11-15 12:20:05 +0100 |
commit | 063ec2ef8922dece88520ee90eeb0e2205829dc2 (patch) | |
tree | 038249cfd4858ee912106c296409a921ff5e7d5d /tests/test_examplefiles.py | |
parent | 7723b5569aba42a90305274ee46700fcb3db16b1 (diff) | |
download | pygments-063ec2ef8922dece88520ee90eeb0e2205829dc2.tar.gz |
Next version will be 1.0.
Diffstat (limited to 'tests/test_examplefiles.py')
-rw-r--r-- | tests/test_examplefiles.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_examplefiles.py b/tests/test_examplefiles.py index ddaa53bf..57d17033 100644 --- a/tests/test_examplefiles.py +++ b/tests/test_examplefiles.py @@ -42,7 +42,10 @@ def test_example_files(): def check_lexer(lx, absfn): text = file(absfn, 'U').read() text = text.strip('\n') + '\n' - text = text.decode('latin1') + try: + text = text.decode('utf-8') + except UnicodeError: + text = text.decode('latin1') ntext = [] for type, val in lx.get_tokens(text): ntext.append(val) |