Hello,

I have created a setup.py file for  distirbution and I bumped into
a small bug when i tried to set my name in the contact field (Tarek Ziadé)

Using string (utf8 file):

setup(
 maintainer="Tarek Ziadé"
)

leads to:

 File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/command/register.py",
line 162, in send_metadata
   auth)
 File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/command/register.py",
line 257, in post_to_server
   value = unicode(value).encode("utf-8")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 10:
ordinal not in range(128)


Using unicode:

setup(
 maintainer=u"Tarek Ziadé"
)

leads to:

 File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py",
line 1094, in write_pkg_file
   file.write('Author: %s\n' % self.get_contact() )
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position
18: ordinal not in range(128)


I would propose a patch for this problem but i don't know what would be the
best input (i guess unicode
for names)


Regards

Tarek

--
Tarek Ziadé | Association AfPy | www.afpy.org
Blog FR | http://programmation-python.org
Blog EN | http://tarekziade.wordpress.com/
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to