<div dir="auto">the string is only needed for Python 2, I think Python3 defaults to utf8 encoding. </div><div class="gmail_extra"><br><div class="gmail_quote">Em 8 de jan de 2017 22:21, "Thomi Richards" <<a href="mailto:thomi.richards@canonical.com">thomi.richards@canonical.com</a>> escreveu:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">Hi Gareth,</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 8, 2017 at 10:24 PM, Gareth France <span dir="ltr"><<a href="mailto:gareth.france@cliftonts.co.uk" target="_blank">gareth.france@cliftonts.co.uk</a><wbr>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">So is there something I have to add to the python script, or the snapcraft.yaml to allow the unicode characters?</blockquote></div><br><br></div><div class="gmail_extra">This sounds like you may be running into unicode encoding issues in your python source files. <a href="https://www.python.org/dev/peps/pep-0263/" target="_blank">https://www.python.org/<wbr>dev/peps/pep-0263/</a> has the full details, but the tl,dr version is that if you have unicode literals in your python source file you need something like "# -*- coding: utf-8 -*-" at the top of your file. The python interpreter inspects your environment to determine the correct encoding to use, but your environment in a confined snap probably doesn't provide the same hints...</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">If that doesn't work, can you build a minimal reproducer for us to look at?</div><div class="gmail_extra"><br></div><div class="gmail_extra">Cheers,</div><div class="gmail_extra"><div><br></div>-- <br><div class="m_7338621439577913835gmail_signature"><div dir="ltr"><div>Thomi Richards<br></div><a href="mailto:thomi.richards@canonical.com" target="_blank">thomi.richards@canonical.com</a><br></div></div>
</div></div>
<br>--<br>
Snapcraft mailing list<br>
<a href="mailto:Snapcraft@lists.snapcraft.io">Snapcraft@lists.snapcraft.io</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/<wbr>mailman/listinfo/snapcraft</a><br>
<br></blockquote></div></div>