On Oct 8, 6:02 pm, JB <zo...@chez.Com> wrote:
> david.hautb...@gmail.com a écrit :
>
>
>
> > On Oct 6, 5:14 pm, JB <zo...@chez.Com> wrote:
> >> david.hautb...@gmail.com a écrit :
>
> >>>>>> print u'Internet radio devices \u2014 what a good/bad idea'
> >>> Traceback (most recent call last):
> >>> File "<stdin>", line 1, in <module>
> >>> UnicodeEncodeError: 'ascii' codec can't encode character u'\u2014' in
> >>> position 23: ordinal not in range(128)
> >>> Rien n'y fait... toujours la même erreur.
> >>> Avez vous une idée ?
> >> Verifier l'encodage par defaut dans le fichier lib/site.py de la distrib
> >> python ?
>
> >> Bon weekend
>
> >> Julien.
>
> > Je ne vois nul part l'encodage par défaut
>
> chercher 'ascii' dans le fichier :
>
> def setencoding():
> """Set the string encoding used by the Unicode implementation. The
> default is 'ascii', but if you're willing to experiment, you can
> change this."""
> encoding = "ascii" # Default value set by _PyUnicode_Init()
>
> enfin en meme temps, le - est géré par ascii heureusement 
>
> Julien
J'utilise python2.5.
Je n'ai pas cette portion de code dans site.py.
Dans /usr/lib/python2.5, je n'ai aucun fichier qui contient la méthode
setencoding.
Le caractère qui pose problème n'est pas - , mais un long - (mal
retranscrit sur cette page)