Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'string.': 0.04; '"""': 0.05; 'error:': 0.05; 'reason,': 0.07; 'encode': 0.09; 'encoding.': 0.09; 'cc:addr:python-list': 0.10; '2.7': 0.13; 'subject:Unicode': 0.16; 'string,': 0.17; 'unicode': 0.17; 'cc:2**0': 0.23; "i've": 0.23; 'cc:no real name:2**0': 0.24; 'script': 0.24; 'tried': 0.25; 'cc:addr:python.org': 0.25; 'header :In-Reply-To:1': 0.25; 'creating': 0.26; 'setting': 0.26; 'message-id:@mail.gmail.com': 0.27; 'there.': 0.28; 'fixed': 0.28; 'run': 0.28; 'character': 0.29; "i'm": 0.29; 'maybe': 0.29; 'error': 0.30; 'print': 0.32; 'changed': 0.34; 'received:google.com': 0.34; 'whatever': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'but': 0.36; 'data.': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'gives': 0.39; 'header:Received:5': 0.40; 'yours': 0.88 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=/NjO/oQmPybAINF5WP31YZcDfXFc0vMTPyuClsmu8hI=; b=cDGqbtiYnZR0cdZjpqhapPpkZBZFhUAq+8wYW/lGhopXRUcWnczAY5vPk78V3knQM6 Mz3b8P6jKgaDXvXclYCeEYBlCcfSwMR0BuI0IYfYhglUtSQNqEzhWaxPPaVvmoO4cjm/ 698BNElDsCaXUOwtCeuvnZvgQJYgXEjka8z8lnJia86lxGFnt0J4AvwQ7N/ytaTmYMBy uqPoW/IMm8nWyoW7n32WOKHkFRoogTCE9LLMgDxJ4OG6aCFmRqSMD0/LvO2RgnxpLV1G 4wgGnIoN1g7guwwPrqaGy/5gTncIEvQPf6uqWAnZ2t1jrUSxk0VOgxeDTCqMx2Cfms1p CFLg== MIME-Version: 1.0 In-Reply-To: <50CF5F72.90402@davea.name> References: <50ceb674$0$29868$c3e8da3$5496439d@news.astraweb.com> <50CF5F72.90402@davea.name> Date: Mon, 17 Dec 2012 19:36:01 +0100 Subject: Re: Unicode From: Anatoli Hristov To: d@davea.name Content-Type: text/plain; charset=UTF-8 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1355769364 news.xs4all.nl 6867 [2001:888:2000:d::a6]:58982 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:35004 > src.decode() is creating a unicode string. The error is not happening > there. But when print is used with a unicode string, it has to encode > the data. And for whatever reason, yours is using latin-1, and you have > a character in there which is not in the latin-1 encoding. I fixed the print, I changed the setting of the terminal and also on the sshconfig, so now when I print I'm able to print out without problems, but when I tried to run the script I've made it gives me again the same error : ""Unexpected error: exceptions.UnicodeEncodeError """ Maybe I will try to update to 2.7