From: Christopher Lenz Date: Tue, 3 Jul 2007 16:01:41 +0000 (+0000) Subject: Correctly handle non-ASCII chars in the catalog MIME headers. X-Git-Tag: 1.0~451 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a96d03cc74e4868d251b9672c2bb08712d365e48;p=thirdparty%2Fbabel.git Correctly handle non-ASCII chars in the catalog MIME headers. --- diff --git a/babel/messages/catalog.py b/babel/messages/catalog.py index f590bab6..996d9f1b 100644 --- a/babel/messages/catalog.py +++ b/babel/messages/catalog.py @@ -386,11 +386,10 @@ class Catalog(object): buf = [] for name, value in self.mime_headers: buf.append('%s: %s' % (name, value)) + flags = set() if self.fuzzy: - flags = set(['fuzzy']) - else: - flags = set() - yield Message('', '\n'.join(buf), flags=flags) + flags |= set(['fuzzy']) + yield Message(u'', u'\n'.join(buf), flags=flags) for key in self._messages: yield self._messages[key]