UnicodeEncodeError: 'ascii' codec can't encode character <--- because of contents in template
I copied the membership confirmation template "list:user:action:subscribe.txt" to templates/site/no/. It works fine until I add a special character like 'æ' 'ø' 'å'. This issue looks a lot like https://gitlab.com/mailman/mailman/issues/410 but his was because of the display name, while mine is because of the template.
Oct 04 18:58:30 2017 (29) Uncaught runner exception: 'ascii' codec can't encode character '\xe6' in position 153: ordinal not in range(128)
Oct 04 18:58:30 2017 (29) Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/mailman/core/runner.py", line 171, in _one_iteration
self._process_one_file(msg, msgdata)
File "/usr/local/lib/python3.6/site-packages/mailman/core/runner.py", line 264, in _process_one_file
keepqueued = self._dispose(mlist, msg, msgdata)
File "/usr/local/lib/python3.6/site-packages/mailman/runners/command.py", line 196, in _dispose
mlist, msg, msgdata, parts, results)
File "/usr/local/lib/python3.6/site-packages/mailman/commands/eml_membership.py", line 104, in process
ISubscriptionManager(mlist).register(subscriber)
File "/usr/local/lib/python3.6/site-packages/mailman/app/subscriptions.py", line 520, in register
list(workflow)
File "/usr/local/lib/python3.6/site-packages/mailman/app/workflow.py", line 69, in __next__
return step()
File "/usr/local/lib/python3.6/site-packages/mailman/app/subscriptions.py", line 336, in _step_send_confirmation
self.mlist, self.token, self.address.email))
File "/usr/local/lib/python3.6/site-packages/zope/event/__init__.py", line 32, in notify
subscriber(event)
File "/usr/local/lib/python3.6/site-packages/mailman/app/subscriptions.py", line 584, in handle_SubscriptionConfirmationNeededEvent
_handle_confirmation_needed_events(event, 'list:user:action:subscribe')
File "/usr/local/lib/python3.6/site-packages/mailman/app/subscriptions.py", line 576, in _handle_confirmation_needed_events
msg = UserNotification(email_address, confirm_address, subject, text)
File "/usr/local/lib/python3.6/site-packages/mailman/email/message.py", line 124, in __init__
self.set_payload(text.encode(charset), charset)
UnicodeEncodeError: 'ascii' codec can't encode character '\xe6' in position 153: ordinal not in range(128)