ronrsr wrote:
> > >
> > Try putting "use_unicode=True" in the MySQLdb "connect" call.
>
> tried that, and also added charset="utf8" -
>
> now, I can't do any string operations, I get the error msg:
>
> descriptor 'lower' requires a 'str' object but received a 'unicode'
> args = ("descript
ronrsr wrote:
> querystring = "update zingers set keywords = '%s', citation =
> '%s', quotation = %s' where zid = %d" %
> (keywords,citation,quotation,zid)
that's not a good way to pass strings to the database. for the right
way to do this, see:
http://effbot.org/pyfaq/how-do-i-e
ronrsr wrote:
> now, I can't do any string operations, I get the error msg:
>
> descriptor 'lower' requires a 'str' object but received a 'unicode'
> args = ("descriptor 'lower' requires a 'str' object but received
> a 'unicode'",)
what's a "string operation" in this context? are you tryi
> >
> Try putting "use_unicode=True" in the MySQLdb "connect" call.
tried that, and also added charset="utf8" -
now, I can't do any string operations, I get the error msg:
descriptor 'lower' requires a 'str' object but received a 'unicode'
args = ("descriptor 'lower' requires a 'str'
ronrsr wrote:
> code for storing to database:
>
> querystring = "update zingers set keywords = '%s', citation =
> '%s', quotation = %s' where zid = %d" %
> (keywords,citation,quotation,zid)
You're missing a single quote in there around the quotation %s.
Are you also replacing "\\" w
version of python is either 2.2 or 2.4
bests,
-rsr-
John Nagle wrote:
> ronrsr wrote:
--
http://mail.python.org/mailman/listinfo/python-list
version of python is 2.2 -
--
http://mail.python.org/mailman/listinfo/python-list
ronrsr wrote:
>>are you passing in the strings as Unicode strings, or as something else?
>> if you're using something else, what have you done to tell the
>>database what it is?
>>
>
>
>
> not at all sure what I'm passing it as.
>
> The database default encoding is utf-8
> the database collat
>
> are you passing in the strings as Unicode strings, or as something else?
> if you're using something else, what have you done to tell the
> database what it is?
>
not at all sure what I'm passing it as.
The database default encoding is utf-8
the database collation is utf-8
the page encod
structure for the DB:
CREATE TABLE `zingers` (
`zid` int(9) unsigned NOT NULL auto_increment,
`keywords` varchar(255) default NULL,
`citation` text,
`quotation` text,
PRIMARY KEY (`zid`)
) ENGINE=MyISAM DEFAULT CHARSET=UTF8 AUTO_INCREMENT=422 ;
code for stor
ronrsr wrote:
> I have an MySQL database called zingers. The structure is:
>
> zid - integer, key, autoincrement
> keyword - varchar
> citation - text
> quotation - text
>
> the encoding and collation is utf-8
>
> I am having trouble storing text, as typed in last two fields. S
I have an MySQL database called zingers. The structure is:
zid - integer, key, autoincrement
keyword - varchar
citation - text
quotation - text
the encoding and collation is utf-8
I am having trouble storing text, as typed in last two fields. Special
characters and punctuation
12 matches
Mail list logo