Ciao,

Il giorno 28 settembre 2017 11:29, Massimiliano Rosi <
massimiliano.r...@gmail.com> ha scritto:

>
>
> invece su un pc embedded con busybox e python3.6 compilato dai sorgenti
> perfettamente funzionante lo stesso comando genera un errore, che non
> capisco come risolvere:
>
> >>> print ('\u00b0')
>
> Traceback (most recent call last):
>
>   File "<stdin>", line 1, in <module>
>
> UnicodeEncodeError: 'ascii' codec can't encode character '\xb0' in
> position 0: ordinal not in range(128)
>
tempo fa ho avuto lo stesso problema e l'ho risolto impostando il giusto
"locale" per l'utente con il quale viene lanciato lo script

prova a dare un'occhiata anche a questo link che parla proprio di busybox
http://buildroot-busybox.2317881.n4.nabble.com/User-question-UTF-8-td112683.html


Francesco
-- 
"Unix IS user friendly. It's just selective about who its friend are"

"Nevertheless I still think it’s a bad idea to make things harder for
ourselves if we can avoid it."

"C is quirky, flawed, and an enormous success."
                                   -- Dennis Ritchie

"Shipping is a feature. A really important feature. Your product must have
it."

"There is no such a thing as a temporary change or workaround: In most
cases, workarounds are tech debt."

"La gatta frettolosa ha fatto i gattini ciechi"
_______________________________________________
Python mailing list
Python@lists.python.it
https://lists.python.it/mailman/listinfo/python

Rispondere a