A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-June/025529.html below:

[Python-Dev] unicode() and its error argument

[Python-Dev] unicode() and its error argumentOleg Broytmann Oleg Broytmann <phd@phd.pp.ru>
Tue, 18 Jun 2002 18:51:27 +0400
Hello!

On Sat, Jun 15, 2002 at 07:04:41PM +0400, Oleg Broytmann wrote:
> On Sat, Jun 15, 2002 at 11:05:12AM -0400, Guido van Rossum wrote:
> > >    I got the error very often (but I use encoding conversion much more
> > > often than you). First time I saw it I was very surprized that neither
> > > "ignore" nor "replace" can eliminate the error.
> > 
> > Got an example?
> 
>    Not right now... I'll send it when I get one.

   Sorry for the false alarm. It was my fault. I used to write

s = unicode(s, "cp1251").encode("koi8-r", "replace")

   where I need

s = unicode(s, "cp1251", "replace").encode("koi8-r", "replace")                         ^^^^^^^^^

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4