Hi All,
I need to process a file to create a hash.. the
file contain a section
similar to
string MetaDataPrompt = "Discovery No"; string MetaDataFieldName = "Discovery No"; string MetaDataType = "string"; string MetaDataValue = "£500";
everything was working fine until recently I got an error and found that it is due to "£" character and the error generated when processing the hash ascii' codec can't decode byte 0xa3 in position 0: ordinal not in range(128) I assume that this happening because the hash values I have are asciii encoded and I need to convert to unicode somehow.. i tried some googling and found http://www.jorendorff.com/articles/unicode/python.html with not much luck in getting it work in my case. metaValue=unicode('fieldValues[1],
errors='ignore') this will make the code work but i looses the "£" , I know that how it supposed to work
is there a way to handle such a situation in python code snippet def _readXSTFilePoll(filename):
Thanks -----------------------------------------------------
Thomas Thomas [EMAIL PROTECTED] Phone. +64 7 855 8478 Fax. +64 7 855 8871 |
-- http://mail.python.org/mailman/listinfo/python-list