<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 76: DNS lookup error when e-mail address is unicode</title><link href="https://sourceforge.net/p/formencode/bugs/76/" rel="alternate"/><link href="https://sourceforge.net/p/formencode/bugs/76/feed.atom" rel="self"/><id>https://sourceforge.net/p/formencode/bugs/76/</id><updated>2009-05-07T16:56:17Z</updated><subtitle>Recent changes to 76: DNS lookup error when e-mail address is unicode</subtitle><entry><title>DNS lookup error when e-mail address is unicode</title><link href="https://sourceforge.net/p/formencode/bugs/76/" rel="alternate"/><published>2009-05-07T16:56:17Z</published><updated>2009-05-07T16:56:17Z</updated><author><name>Joseph Tate</name><uri>https://sourceforge.net/u/jtate/</uri></author><id>https://sourceforge.netdf1778fa1a75ac15e670ba4586ddff48ec9e6c29</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm using Python 2.4, but it happens with python 2.5 also.  pydns is 2.3.3, formencode is version 1.2.2.&lt;/p&gt;
&lt;p&gt;Reproducing test case:&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; import formencode.validators&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; e = formencode.validators.Email(resolve_domain=True)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; e.to_python(u'foo@example.com')&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
File "/home/ecardg5/python/lib/python2.5/site-packages/FormEncode-1.2.1-py2.5.egg/formencode/api.py", line 416, in to_python&lt;br /&gt;
vp(value, state)&lt;br /&gt;
File "/home/ecardg5/python/lib/python2.5/site-packages/FormEncode-1.2.1-py2.5.egg/formencode/validators.py", line 1364, in validate_python&lt;br /&gt;
a=DNS.DnsRequest(domain, qtype='mx').req().answers&lt;br /&gt;
File "build/bdist.linux-i686/egg/DNS/Base.py", line 202, in req&lt;br /&gt;
File "build/bdist.linux-i686/egg/DNS/Lib.py", line 461, in addQuestion&lt;br /&gt;
File "build/bdist.linux-i686/egg/DNS/Lib.py", line 128, in addname&lt;br /&gt;
UnicodeDecodeError: 'ascii' codec can't decode byte 0x92 in position 1: ordinal not in range(128)&lt;/p&gt;
&lt;p&gt;I note that 2126902 was already filed, but closed as wfm.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>