Re: How to display Chinese in a list retrieved from database via python

2008-12-29 Thread Mark Tolonen
zxo102 zxo...@gmail.com wrote in message news:2560a6e0-c103-46d2-aa5a-8604de4d1...@b38g2000prf.googlegroups.com... I have a list in a dictionary and want to insert it into the html file. I test it with following scripts of CASE 1, CASE 2 and CASE 3. I can see 中文 in CASE 1 but that is not

Re: How to display Chinese in a list retrieved from database via python

2008-12-29 Thread zxo102
On 12月29日, 下午5时06分, Mark Tolonen metolone+gm...@gmail.com wrote: zxo102 zxo...@gmail.com wrote in message news:2560a6e0-c103-46d2-aa5a-8604de4d1...@b38g2000prf.googlegroups.com... I have a list in a dictionary and want to insert it into the html file. I test it with following scripts of

Re: How to display Chinese in a list retrieved from database via python

2008-12-29 Thread Mark Tolonen
zxo102 zxo...@gmail.com wrote in message news:7e38e76a-d5ee-41d9-9ed5-73a2e2993...@w1g2000prm.googlegroups.com... On 12月29日, 下午5时06分, Mark Tolonen metolone+gm...@gmail.com wrote: zxo102 zxo...@gmail.com wrote in message

Re: How to display Chinese in a list retrieved from database via python

2008-12-28 Thread zxo102
On 12月27日, 下午4时08分, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Sat, 27 Dec 2008 03:03:24 -0200,zxo102zxo...@gmail.com escribió: On 12月26日, 下午3时16分, Mark Tolonen metolone+gm...@gmail.com   wrote: I was able to display 中文 successfully with this code: f=open('test.html','wt')

Re: How to display Chinese in a list retrieved from database via python

2008-12-27 Thread Gabriel Genellina
En Sat, 27 Dec 2008 03:03:24 -0200, zxo102 zxo...@gmail.com escribió: On 12月26日, 下午3时16分, Mark Tolonen metolone+gm...@gmail.com wrote: I was able to display 中文 successfully with this code: f=open('test.html','wt') f.write('''htmlhead META HTTP-EQUIV=Content-Type

Re: How to display Chinese in a list retrieved from database via python

2008-12-26 Thread zxo102
On 12月26日, 下午3时16分, Mark Tolonen metolone+gm...@gmail.com wrote: zxo102 zxo...@gmail.com wrote in message news:979fdf6d-0500-47ba-87fd-0f0361ca3...@p2g2000prf.googlegroups.com... On 12月26日, 上午4时58分, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Thu, 25 Dec 2008 07:27:03 -0200,

Re: How to display Chinese in a list retrieved from database via python

2008-12-25 Thread zxo102
On 12月25日, 下午3时35分, Chris Rebert c...@rebertia.com wrote: On Wed, Dec 24, 2008 at 11:29 PM, zxo102 zxo...@gmail.com wrote: Hi, I retrieve some info in Chinese from postgresql and assign it to a variable 'info' defined in javascript of a html page: var info =

Re: How to display Chinese in a list retrieved from database via python

2008-12-25 Thread Jeroen Ruigrok van der Werven
-On [20081225 08:30], zxo102 (zxo...@gmail.com) wrote: Anybody knows how to solve this problem? You are assigning/pushing out Python byte sequences, not Unicode. Look at u'' string variables, x.encode() and x.decode() to help you. It's widely documented on the Internet, a quick Python Unicode

Re: How to display Chinese in a list retrieved from database via python

2008-12-25 Thread Gabriel Genellina
En Thu, 25 Dec 2008 07:27:03 -0200, zxo102 zxo...@gmail.com escribió: On 12月25日, 下午3时35分, Chris Rebert c...@rebertia.com wrote: On Wed, Dec 24, 2008 at 11:29 PM, zxo102 zxo...@gmail.com wrote: Hi, I retrieve some info in Chinese from postgresql and assign it to a variable 'info' defined

Re: How to display Chinese in a list retrieved from database via python

2008-12-25 Thread zxo102
On 12月26日, 上午4时58分, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Thu, 25 Dec 2008 07:27:03 -0200, zxo102 zxo...@gmail.com escribió: On 12月25日, 下午3时35分, Chris Rebert c...@rebertia.com wrote: On Wed, Dec 24, 2008 at 11:29 PM, zxo102 zxo...@gmail.com wrote: Hi, I retrieve some

Re: How to display Chinese in a list retrieved from database via python

2008-12-25 Thread Mark Tolonen
zxo102 zxo...@gmail.com wrote in message news:979fdf6d-0500-47ba-87fd-0f0361ca3...@p2g2000prf.googlegroups.com... On 12月26日, 上午4时58分, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Thu, 25 Dec 2008 07:27:03 -0200, zxo102 zxo...@gmail.com escribió: On 12月25日, 下午3时35分, Chris Rebert

How to display Chinese in a list retrieved from database via python

2008-12-24 Thread zxo102
Hi, I retrieve some info in Chinese from postgresql and assign it to a variable 'info' defined in javascript of a html page: var info = ['\xd6\xd0\xce\xc4','\xd6\xd0\xce\xc4','\xd6\xd0\xce \xc4'] But I want it to be var info = ['中文','中文','中文'] since in html pages (via javascript), the

Re: How to display Chinese in a list retrieved from database via python

2008-12-24 Thread Chris Rebert
On Wed, Dec 24, 2008 at 11:29 PM, zxo102 zxo...@gmail.com wrote: Hi, I retrieve some info in Chinese from postgresql and assign it to a variable 'info' defined in javascript of a html page: var info = ['\xd6\xd0\xce\xc4','\xd6\xd0\xce\xc4','\xd6\xd0\xce \xc4'] But I want it to be