I input the data which is from the database into array.
and then I print out the array to the file
but the letter I can not figure out.
fileHandle = open ( '/var/chroot/www/htdocs/django/js/model.js',
'w' )
fileHandle.write( codecs.BOM_UTF8 )
print >> fileHandle, 'var blog = '
print >> fileHandle, blog
fileHandle.close()
this is the file model.js
var blog =
{'description': '\xec\xb9\xb4\xed\x86\xa8\xeb\xa6\xad
\xed\x91\xb8\xeb\xa6\x84\xed\x84\xb0', 'links': [{'link': '
www.hideout.com.br', 'title': 'ggum'}, {'link': 'www.hideout.com.br',
'title': 'hideout'}, {'link': 'www.hideout.com.br', 'title': 'hideout'},
{'link': 'www.hideout.com.br', 'title': 'hideout'}], 'title':
u'\uce74\ud1a8\ub9ad \ud478\ub984\ud130', 'items': [{'body':
'\xeb\xaf\xbc\xec\x95\x84\xeb\x9e\x80\xe3\x85\x81\xec\x95\x8c\r\n\r\n\xed\x85\x8c\xec\x8a\xa4\xed\x8a\xb8\xec\x9e\x85\xeb\x8b\x88\xe3\x85\x8f.',
'permalink': 'perma link', 'author': 'ggum', 'title':
'\xec\xb2\xab\xeb\xb2\x88 \xec\xa7\xb8
\xea\xb3\xb5\xec\xa7\x80\xec\x82\xac\xed\x95\xad', 'comments': [{'comment':
'blah', 'author': 'ygp', 'dateTime': '10:43 7/20/2004'}], 'time': '13234
23423423'}, {'body': '\xec\x98\xa4\xeb\x8a\x98\xec\x9d\x80
\xec\xa0\x95\xeb\xa7\x90
\xec\x9e\xac\xeb\xb0\x8c\xec\x97\x88\xeb\x8b\xa4.\r\n\r\n\xeb\x98\x90
\xed\x95\x9c\xeb\xb2\x88 \xeb\x8d\x94.......', 'permalink': 'perma link',
'author': 'ggum', 'title': '\xec\x98\xa4\xeb\x8a\x98\xec\x9d\x98
\xec\x9d\xb4\xec\x95\xbc\xea\xb8\xb0', 'comments': [{'comment': 'blah',
'author': 'ygp', 'dateTime': '10:43 7/20/2004'}], 'time': '13234
23423423'}], 'currentPost': {'dateIndex': 0, 'postIndex': 0}, 'sections':
[{'link': 'www.hideout.com.br', 'title':
'\xea\xb3\xb5\xec\xa7\x80\xec\x82\xac\xed\x95\xad'}, {'link': '
www.hideout.com.br', 'title':
'\xec\x9a\xb0\xeb\xa6\xac\xeb\x93\xa4\xec\x9d\x98
\xec\x9d\xb4\xec\x95\xbc\xea\xb8\xb0'}, {'link': 'www.hideout.com.br',
'title': '\xed\x9b\x84\xec\x9b\x90'}]}
What I want to do is to see properly the letter not this letter '\xec\x9d'
Can anyone who know solution let me know how to do kindly?
Thanks a lot.
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor