import BOM_UTF8

This commit is contained in:
Joseph Reagle 2013-01-23 11:18:45 -05:00
commit c3baf93445

View file

@ -14,7 +14,7 @@ import fnmatch
from collections import defaultdict, Hashable
from functools import partial
from codecs import open
from codecs import open, BOM_UTF8
from datetime import datetime
from itertools import groupby
from jinja2 import Markup
@ -187,7 +187,7 @@ def get_date(string):
def pelican_open(filename):
"""Open a file and return it's content"""
content = open(filename, encoding='utf-8').read()
if content[0] == codecs.BOM_UTF8.decode('utf8'):
if content[0] == BOM_UTF8.decode('utf8'):
content = content[1:]
return content