On Tue, Aug 18, 2009 at 5:59 AM, Kent Johnson wrote:
> On Tue, Aug 18, 2009 at 12:18 AM, Mal Wanstall wrote:
>> On Tue, Aug 18, 2009 at 9:00 AM, Eduardo Vieira
>> wrote:
>
>>> Here is the Error output:
>>> utf-8
>>> Traceback (most recent call last):
>>> File "C:\myscripts\encondingproblem.py", l
> Setting sys.setdefaultencoding() affects all scripts you run and will
> make scripts that you write non-portable. A better solution is to
> properly encode the output, for example
> for company in companies[:4]: # assuming companies is a list
> print company.encode('cp437')
>
Kent's suggestion a
On Tue, Aug 18, 2009 at 12:18 AM, Mal Wanstall wrote:
> On Tue, Aug 18, 2009 at 9:00 AM, Eduardo Vieira
> wrote:
>> Here is the Error output:
>> utf-8
>> Traceback (most recent call last):
>> File "C:\myscripts\encondingproblem.py", line 13, in
>> print companies[:4]
>> UnicodeEncodeError: '
On Tue, Aug 18, 2009 at 9:00 AM, Eduardo Vieira wrote:
> Hello, I have this sample script from beautiful soup, but I keep
> getting an error because of encoding. I have google for solutions but
> I don't seem to understand. Even this is dealt in Beautiful Soup's doc
> but I am not able to understan
Hello, I have this sample script from beautiful soup, but I keep
getting an error because of encoding. I have google for solutions but
I don't seem to understand. Even this is dealt in Beautiful Soup's doc
but I am not able to understant/apply the solution successfully.
from BeautifulSoup import B