Changeset 153 for pyyaml/trunk/lib/yaml/emitter.py
- Timestamp:
- 05/06/06 18:09:50 (7 years ago)
- File:
-
- 1 edited
-
pyyaml/trunk/lib/yaml/emitter.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pyyaml/trunk/lib/yaml/emitter.py
r143 r153 698 698 line_breaks = True 699 699 if not (ch == u'\n' or u'\x20' <= ch <= u'\x7E'): 700 if ch < u'\x80' or ch == u'\uFEFF': # '\uFEFF' is BOM. 701 special_characters = True 702 else: 700 if (ch == u'\x85' or u'\xA0' <= ch <= u'\uD7FF' 701 or u'\uE000' <= ch <= u'\uFFFD') and ch != u'\uFEFF': 703 702 unicode_characters = True 704 703 if not self.allow_unicode: 705 704 special_characters = True 705 else: 706 special_characters = True 706 707 707 708 # Spaces, line breaks, and how they are mixed. State machine. … … 962 963 if ch is None or ch in u'"\\\x85\u2028\u2029\uFEFF' \ 963 964 or not (u'\x20' <= ch <= u'\x7E' 964 or (self.allow_unicode and ch > u'\x7F')): 965 or (self.allow_unicode 966 and (u'\xA0' <= ch <= u'\uD7FF' 967 or u'\uE000' <= ch <= u'\uFFFD'))): 965 968 if start < end: 966 969 data = text[start:end]
Note: See TracChangeset
for help on using the changeset viewer.
