Re: [Tutor] testing u=unicode(str, 'utf-8') and u = str.decode('utf-8')

2006-04-06 Thread Kent Johnson
Keo Sophon wrote: > Hi, > > Today i tested u=unicode(str,'utf-8') and u=str.decode('utf-8'). Then in both > case I used: > > if isinstance(u,str): >print "just string" > else: > print "unicode" > > the result of both case are "unicode". So it seems u=unicode(str,'utf-8') and > u=str.deco

[Tutor] testing u=unicode(str, 'utf-8') and u = str.decode('utf-8')

2006-04-05 Thread Keo Sophon
Hi, Today i tested u=unicode(str,'utf-8') and u=str.decode('utf-8'). Then in both case I used: if isinstance(u,str): print "just string" else: print "unicode" the result of both case are "unicode". So it seems u=unicode(str,'utf-8') and u=str.decode('utf-8') are the same. How about the pr