On 7/2/2012 8:49 PM, self.python wrote:
it's a simple source view program.
the codec of the target website is utf-8
so I read it and print the decoded
which re-encodes before printing
--
#-*-coding:utf8-*-
import urllib2
rf=urllib2
On 7/2/2012 8:49 PM, self.python wrote:
it's a simple source view program.
the codec of the target website is utf-8
so I read it and print the decoded
which re-encodes before printing
--
#-*-coding:utf8-*-
import urllib2
rf=urllib2
On 03/07/2012 01:49, self.python wrote:
it's a simple source view program.
the codec of the target website is utf-8
so I read it and print the decoded
--
#-*-coding:utf8-*-
import urllib2
rf=urllib2.urlopen(r"http://gall.dcinside.com/
On 7/2/2012 7:49 PM, self.python wrote:
>
> Traceback (most recent call last):
> File "C:wrong.py", line 8, in
> print rf.read().decode('utf-8')
> UnicodeEncodeError: 'cp949' codec can't encode character u'u1368' in position
>
it's a simple source view program.
the codec of the target website is utf-8
so I read it and print the decoded
--
#-*-coding:utf8-*-
import urllib2
rf=urllib2.urlopen(r"http://gall.dcinside.com/list.php?id=programming";)
print rf.read(