[Tutor] encoding text in html

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Wed Sep 13 16:37:51 CEST 2006



On Wed, 13 Sep 2006, anil maran wrote:

>
> 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?

See:

     http://www.joelonsoftware.com/articles/Unicode.html

Do you have a small sample of the HTML file that's being generated?  One 
of us here may want to inspect it to make sure you really are generating 
UTF-8 output.  You may also want to show the Python code you've written to 
generate the output.

Try to give us enough information so we can attempt to reproduce what 
you're seeing.

Good luck!


More information about the Tutor mailing list