How to Split Chinese Character with backslash representation?

Wijaya Edward ewijaya at i2r.a-star.edu.sg
Thu Oct 26 23:43:06 EDT 2006


Hi all,

I was trying to split a string that 
represent chinese characters below:
 
 
>>> str = '\xc5\xeb\xc7\xd5\xbc'
>>> print str2,
???
>>> fields2 = split(r'\\',str)
>>> print fields2,
['\xc5\xeb\xc7\xd5\xbc']

But why the split function here doesn't seem
to do the job for obtaining the desired result:
 
['\xc5','\xeb','\xc7','\xd5','\xbc']
 
 
 
Regards,
-- Edward WIJAYA
SINGAPORE



------------ Institute For Infocomm Research - Disclaimer -------------
This email is confidential and may be privileged.  If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its contents to any other person. Thank you.
--------------------------------------------------------



More information about the Python-list mailing list