From 8a03cfde969bd2d63128405ed2bdff8622f12539 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 6 Feb 2011 00:07:46 +0100 Subject: [PATCH] don't fail zeroconf with non-ascii hostname --- src/common/zeroconf/connection_zeroconf.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/common/zeroconf/connection_zeroconf.py b/src/common/zeroconf/connection_zeroconf.py index 28457deeb..12524cf57 100644 --- a/src/common/zeroconf/connection_zeroconf.py +++ b/src/common/zeroconf/connection_zeroconf.py @@ -87,8 +87,7 @@ class ConnectionZeroconf(CommonConnection, ConnectionHandlersZeroconf): 'is_zeroconf', True) gajim.config.set_per('accounts', gajim.ZEROCONF_ACC_NAME, 'use_ft_proxies', False) - #XXX make sure host is US-ASCII - self.host = unicode(socket.gethostname()) + self.host = unicode(socket.gethostname(), locale.getpreferredencoding()) gajim.config.set_per('accounts', gajim.ZEROCONF_ACC_NAME, 'hostname', self.host) self.port = gajim.config.get_per('accounts', gajim.ZEROCONF_ACC_NAME,