[aur-general] Compiling with UTF-8 symbols in build path

Martti Kühne mysatyre at gmail.com
Thu Dec 20 05:51:51 EST 2012


On Thu, Dec 20, 2012 at 11:12 AM, Paul Weingardt
<spam.nobody44 at googlemail.com> wrote:
> Hello,
> I just got a comment on my git-cola package, stating that the
> compilation fails, when the path to the PKGBUILD contains a UTF-8 symbol
> like the Euro "€" symbol.
>
> Example:
> The PKGBUILD is located under "/home/paul/€uro/". "cd" into that
> directory and execute makepkg.
>
> I am really sure, that this is an upstream problem (I guess it is even
> an issue in python2-spinx) and I can't solve it. Would someone take a
> look at it please?
>
> Here is the error message:
>
> Exception occurred:
> File "/usr/lib/python2.7/site-packages/sphinx/environment.py", line 758, in read_doc
>     pub.set_source(None, src_path.encode(fs_encoding))
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 25: ordinal not in range(128)
>
> Just tryed it out: fs_encoding is "UTF-8" on my machine.
> And help is appreciated.
>
> nobody44


hello there.

Pyhton2's handling of unicode strings is retarded. Either use python3
which does it right or look at [1] which should make things clear for
you with examples. I doubt encode() there is the right function call,
as I can prove in a local test easily. [2]

cheers!
mar77i

[1] http://docs.python.org/2/howto/unicode.html
[2] http://pastebin.ca/2295197


More information about the aur-general mailing list