Re: UnicodeDecodeError
Paul Winkler <[email protected]> Wed, 7 Dec 2005 12:39:24 -0500
| Newsgroups | gmane.comp.web.zope.zodb.dirstorage |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Dec 07, 2005 at 04:16:27PM +0100, Frank Burkhardt wrote:
> I'm not really a python expert. How do I determine, if a variable is unicode or
> not? I used the debugger but type(ob,u,...) just told me, that those objects are
> of type "str".
Then they are not unicode.
pw@kermit ~ $ python2.3
Python 2.3.5 (#1, Apr 27 2005, 10:36:02)
[GCC 3.3.5-20050130 (Gentoo Linux 3.3.5.20050130-r1,
ssp-3.3.5.20050130-1, pie- on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> type(u'hello')
<type 'unicode'>
>>> type('hello')
<type 'str'>
--
Paul Winkler
http://www.slinkp.com
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click