Re: [Twisted-Python] print unicode

2010-05-05 Thread Pet
On Wed, May 5, 2010 at 4:54 PM, Itamar Turner-Trauring wrote: > On Wed, 2010-05-05 at 16:47 +0200, Pet wrote: >> Now, I'm getting Exception with >> >>           File >> "/usr/local/tw10/lib/python2.5/site-packages/Twisted-10.0.0-py2.5-linux-x86_64.egg/twisted/python/log.py", >> line 555, in write

Re: [Twisted-Python] print unicode

2010-05-05 Thread Itamar Turner-Trauring
On Wed, 2010-05-05 at 16:47 +0200, Pet wrote: > Now, I'm getting Exception with > > File > "/usr/local/tw10/lib/python2.5/site-packages/Twisted-10.0.0-py2.5-linux-x86_64.egg/twisted/python/log.py", > line 555, in write > d = (self.buf + data).split('\n') > exceptions

Re: [Twisted-Python] print unicode

2010-05-05 Thread Pet
On Wed, May 5, 2010 at 4:29 PM, Pet wrote: > On Wed, May 5, 2010 at 4:15 PM, Pet wrote: >> On Wed, May 5, 2010 at 2:49 PM, Itamar Turner-Trauring >> wrote: >>> On Wed, 2010-05-05 at 13:45 +0200, Pet wrote: Hello! I'm using Twisted 10.0 and as usually sometime print debug infos wit

Re: [Twisted-Python] print unicode

2010-05-05 Thread Itamar Turner-Trauring
On Wed, 2010-05-05 at 16:15 +0200, Pet wrote: > If I print as you do it works, but my string is fetched from database > and only then it fails Strings coming out of the database are usually just strings. There's nothing database (or Twisted) specific about them.

Re: [Twisted-Python] print unicode

2010-05-05 Thread Pet
On Wed, May 5, 2010 at 4:15 PM, Pet wrote: > On Wed, May 5, 2010 at 2:49 PM, Itamar Turner-Trauring > wrote: >> On Wed, 2010-05-05 at 13:45 +0200, Pet wrote: >>> Hello! >>> >>> I'm using Twisted 10.0 and as usually sometime print debug infos with >>> myunicodestr.encode('UTF-8') which are saved t

Re: [Twisted-Python] print unicode

2010-05-05 Thread Pet
On Wed, May 5, 2010 at 2:49 PM, Itamar Turner-Trauring wrote: > On Wed, 2010-05-05 at 13:45 +0200, Pet wrote: >> Hello! >> >> I'm using Twisted 10.0 and as usually sometime print debug infos with >> myunicodestr.encode('UTF-8') which are saved to logfile, but since >> using twisted 10 I'm getting

Re: [Twisted-Python] print unicode

2010-05-05 Thread Pet
On Wed, May 5, 2010 at 2:47 PM, Phil Mayers wrote: > On 05/05/10 13:31, Pet wrote: >> On Wed, May 5, 2010 at 2:05 PM, Maarten ter Huurne >>  wrote: >>> On Wednesday 05 May 2010, Pet wrote: >>> I'm using Twisted 10.0 and as usually sometime print debug infos with myunicodestr.encode('UTF

Re: [Twisted-Python] print unicode

2010-05-05 Thread Itamar Turner-Trauring
On Wed, 2010-05-05 at 13:45 +0200, Pet wrote: > Hello! > > I'm using Twisted 10.0 and as usually sometime print debug infos with > myunicodestr.encode('UTF-8') which are saved to logfile, but since > using twisted 10 I'm getting > > UnicodeEncodeError: 'ascii' codec can't encode characters... >

Re: [Twisted-Python] print unicode

2010-05-05 Thread Phil Mayers
On 05/05/10 13:31, Pet wrote: > On Wed, May 5, 2010 at 2:05 PM, Maarten ter Huurne > wrote: >> On Wednesday 05 May 2010, Pet wrote: >> >>> I'm using Twisted 10.0 and as usually sometime print debug infos with >>> myunicodestr.encode('UTF-8') which are saved to logfile, but since >>> using twisted

Re: [Twisted-Python] print unicode

2010-05-05 Thread Pet
On Wed, May 5, 2010 at 2:05 PM, Maarten ter Huurne wrote: > On Wednesday 05 May 2010, Pet wrote: > >> I'm using Twisted 10.0 and as usually sometime print debug infos with >> myunicodestr.encode('UTF-8') which are saved to logfile, but since >> using twisted 10 I'm getting >> >> UnicodeEncodeError

Re: [Twisted-Python] print unicode

2010-05-05 Thread Maarten ter Huurne
On Wednesday 05 May 2010, Pet wrote: > I'm using Twisted 10.0 and as usually sometime print debug infos with > myunicodestr.encode('UTF-8') which are saved to logfile, but since > using twisted 10 I'm getting > > UnicodeEncodeError: 'ascii' codec can't encode characters... UTF-8 uses the full 8

[Twisted-Python] print unicode

2010-05-05 Thread Pet
Hello! I'm using Twisted 10.0 and as usually sometime print debug infos with myunicodestr.encode('UTF-8') which are saved to logfile, but since using twisted 10 I'm getting UnicodeEncodeError: 'ascii' codec can't encode characters... type(myunicodestr) returns What is the problem here? Thank