
Tim, I had a similar issue but on Windows and cp1250. I started digging in the source and stuck somwhere in 3rd party libraries and I think it was iconv. What helped me then, was explicitly changing the console's encoding with "chcp" command to the one supporting cp1250 encoding. I know it's not related to FreeBSD, but maybe you will find this information somehow usefull :) Regards Piotrek W dniu 21 lutego 2012 19:00 użytkownik Tim Arnold <Tim.Arnold@sas.com>napisał:
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****
** **
_________________________________________________________________ Mailing list for the lxml Python XML toolkit - http://lxml.de/ lxml@lxml.de https://mailman-mail5.webfaction.com/listinfo/lxml