Afficher un message
Vieux 08/10/2007, 18h02   #19
JB
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Problème d'affichage de caractères dans la console python

david.hautbois@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

  Réponse avec citation
 
Page generated in 0,05482 seconds with 9 queries