
Thanks Stefan. Here is what I've found so far. I've updated the bug report and will continue with any other needed info there. I'm posting here only for the latest info. And thanks Piotr, I appreciate your help, but with FreeBSD I don't think your solution will work for me. Here is the latest info: ldd libxml2.so libxml2.so: libz.so.5 => /lib/libz.so.5 (0x800889000) libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x800e4c000) libm.so.5 => /lib/libm.so.5 (0x801046000) libc.so.7 => /lib/libc.so.7 (0x800647000) ldd /usr/local/lib/libiconv.so.3 /usr/local/lib/libiconv.so.3: libc.so.7 => /lib/libc.so.7 (0x800647000) iconv -l | grep -i cp1252 CP1252 MS-ANSI WINDOWS-1252 -----Original Message----- From: lxml-bounces@lxml.de [mailto:lxml-bounces@lxml.de] On Behalf Of Stefan Behnel Sent: Wednesday, February 22, 2012 2:48 AM To: lxml@lxml.de Subject: Re: [lxml] cp1252 encoding not found on Free BSD 8 Tim Arnold, 21.02.2012 19:00:
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'
I'm neither a Mac nor BSD user, so I can't comment on it. Could you figure out what version of libiconv you are using and if your copy of libxml2 depends on it? Please comment in the bug tracker if you find anything useful. Stefan _________________________________________________________________ Mailing list for the lxml Python XML toolkit - http://lxml.de/ lxml@lxml.de https://mailman-mail5.webfaction.com/listinfo/lxml