hi,
This is a bug reported last August for Mac, but it is also happening for freebsd8.2 (amd64).
https://bugs.launchpad.net/lxml/+bug/707396
Python 2.7.1 (r271:86832, Apr 5 2011, 13:19:14)
[GCC 4.2.1 20070719 [FreeBSD]] on freebsd8
from lxml import etree
parser = etree.HTMLParser(encoding='cp1252')
Traceback (most recent call last):
File "lxml_bug.py", line 11, in <module>
parser = etree.HTMLParser(encoding='cp1252')
File "parser.pxi", line 1423, in lxml.etree.HTMLParser.__init__ (src/lxml/lxml.etree.c:81303)
File "parser.pxi", line 743, in lxml.etree._BaseParser.__init__ (src/lxml/lxml.etree.c:76172)
LookupError: unknown encoding: 'cp1252'
Here are my details:
Python : sys.version_info(major=2, minor=7, micro=1, releaselevel='final', serial=0)
lxml.etree : (2, 3, 1, 0)
libxml used : (2, 7, 8)
libxml compiled : (2, 7, 8)
libxslt used : (1, 1, 26)
libxslt compiled : (1, 1, 26)
platform.architecture()
('64bit', 'ELF')
thanks,
--Tim Arnold