# HG changeset patch # User cmlenz # Date 1200314865 0 # Node ID 7e460ba1aabedd03e71d51c3237923239021555d # Parent b0ff3e4f2005475709513800ceb6dedc7a8c512e Fix for unicode problem when the previous message id is included as a comment in PO serialization. Closes #78. diff --git a/babel/messages/pofile.py b/babel/messages/pofile.py --- a/babel/messages/pofile.py +++ b/babel/messages/pofile.py @@ -422,10 +422,10 @@ _write('#%s\n' % ', '.join([''] + list(message.flags))) if message.previous_id and include_previous: - _write_comment(u'msgid %s' % _normalize(message.previous_id[0]), + _write_comment('msgid %s' % _normalize(message.previous_id[0]), prefix='|') if len(message.previous_id) > 1: - _write_comment(u'msgid_plural %s' % _normalize( + _write_comment('msgid_plural %s' % _normalize( message.previous_id[1] ), prefix='|')