encoding problems in python

1 view
Skip to first unread message

anil

unread,
Sep 13, 2006, 7:58:30 PM9/13/06
to Django users
i was trying to display some text
it is in utf-8 in postgres and when it
is displayed in firefox and ie, it gets displayed as some symols with
4numbers in a box or so even for ' apostrophe please tell me how to
display this properly i try title.__str__

I'm assuming that you're dynamically generating some HTML document. If
so, have you declared the "document encoding" in the HTML file to be
utf-8?
Neanderthals’ Last Stand Is Traced
here is the html file

and here the python code for inserting
filt= Cheetah.Filters.EncodeUnicode()
web.insert('feed_entry',feedtable_id=feedt_id,title=filt.filter(d.entries[i].title),link=d.entries[i].link,updated=chkup)

and code for retriving feeds
i use cheetah to display
feedentry_dct=dict((i.id,web.query("select * from feed_entry where
feedtable_id = $i.id ORDER BY
updated desc, created",vars=locals())) for i in feedlist)

how it is displayed in the html file or cheetah template
#for i in $feedentry_dct[$blog.id]
<a href="$i.link">
$str($i.title)
</a>
thanks for your help
ANil

Reply all
Reply to author
Forward
0 new messages