Unicode characters break snap

√Črico P ericoporto2008 at gmail.com
Mon Jan 9 00:27:47 UTC 2017


the string is only needed for Python 2, I think Python3 defaults to utf8
encoding.

Em 8 de jan de 2017 22:21, "Thomi Richards" <thomi.richards at canonical.com>
escreveu:

> Hi Gareth,
>
> On Sun, Jan 8, 2017 at 10:24 PM, Gareth France <
> gareth.france at cliftonts.co.uk> wrote:
>
>> So is there something I have to add to the python script, or the
>> snapcraft.yaml to allow the unicode characters?
>
>
>
> This sounds like you may be running into unicode encoding issues in your
> python source files. https://www.python.org/dev/peps/pep-0263/ 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...
>
>
> If that doesn't work, can you build a minimal reproducer for us to look at?
>
> Cheers,
>
> --
> Thomi Richards
> thomi.richards at canonical.com
>
> --
> Snapcraft mailing list
> Snapcraft at lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20170108/05f1ab65/attachment.html>


More information about the Snapcraft mailing list