Changeset 5193
- Timestamp:
- 05/11/07 09:49:43 (1 year ago)
- Files:
-
- django/branches/unicode/AUTHORS (modified) (1 diff)
- django/branches/unicode/django/views/debug.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/unicode/AUTHORS
r5185 r5193 108 108 Owen Griffiths 109 109 Espen Grindhaug <http://grindhaug.org/> 110 Thomas GÃŒttler <hv@tbz-pariv.de> 110 111 Brian Harring <ferringb@gmail.com> 111 112 Brant Harris django/branches/unicode/django/views/debug.py
r5054 r5193 188 188 if source is None: 189 189 return None, [], None, [] 190 191 encoding=None 192 for line in source[:2]: 193 # File coding may be specified (and may not be UTF-8). Match 194 # pattern from PEP-263 (http://www.python.org/dev/peps/pep-0263/) 195 match = re.search(r'coding[:=]\s*([-\w.]+)', line) 196 if match: 197 encoding = match.group(1) 198 break 199 if encoding: 200 source = [unicode(sline, encoding) for sline in source] 190 201 191 202 lower_bound = max(0, lineno - context_lines)
